def find_wiki
@project = Project.find(params[:id])
@wiki = @project.wiki
+ render_404 unless @wiki
rescue ActiveRecord::RecordNotFound
render_404
end
effective_date && effective_date <= Date.today
end
+ def wiki_page
+ if project.wiki && !wiki_page_title.blank?
+ @wiki_page ||= project.wiki.find_page(wiki_page_title)
+ end
+ @wiki_page
+ end
+
# Versions are sorted by effective_date
# Those with no effective_date are at the end, sorted by name
def <=>(version)
<% elsif version.effective_date %>
<p><strong><%=l(:label_roadmap_due_in)%> <%= distance_of_time_in_words Time.now, version.effective_date %> (<%= format_date(version.effective_date) %>)</strong></p>
<% end %>
- <p><%=h version.description %></p>
+ <p><%=h version.description %></p>
<% issues = version.fixed_issues.find(:all,
:include => [:status, :tracker],
:conditions => ["tracker_id in (#{@selected_tracker_ids.join(',')})"],
<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 %>%)  
<%= 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>
<br />
- <br />
+ <br />
+ <%= render(:partial => "wiki/content", :locals => {:content => version.wiki_page.content}) if version.wiki_page %>
<ul>
<% if total == 0 %>
<li><%=l(:label_roadmap_no_issues)%></li>
<div id="tab-content-versions" class="tab-content" style="display:none;">
<table class="list">
- <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>
+ <thead>
+ <th><%= l(:label_version) %></th>
+ <th><%= l(:field_effective_date) %></th>
+ <th><%= l(:field_description) %></th>
+ <th><%= l(:label_wiki_page) unless @project.wiki.nil? %></th>
+ <th style="width:15%"></th>
+ <th style="width:15%"></th>
+ </thead>
<tbody>
<% for version in @project.versions.sort %>
<tr class="<%= cycle 'odd', 'even' %>">
<td><%=h version.name %></td>
<td align="center"><%= format_date(version.effective_date) %></td>
<td><%=h version.description %></td>
+ <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>
<td align="center"><small><%= link_to_if_authorized l(:button_edit), { :controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %></small></td>
<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>
</td>
<%= error_messages_for 'version' %>
<div class="box">
-<!--[form:version]-->
<p><%= f.text_field :name, :size => 20, :required => true %></p>
<p><%= f.text_field :description, :size => 60 %></p>
+<p><%= f.text_field :wiki_page_title, :label => :label_wiki_page, :size => 60, :disabled => @project.wiki.nil? %></p>
<p><%= f.text_field :effective_date, :size => 10 %><%= calendar_for('version_effective_date') %></p>
-<!--[eoform:version]-->
</div>
<% content_for :header_tags do %>
<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %>
<%= javascript_include_tag 'calendar/calendar-setup' %>
<%= stylesheet_link_tag 'calendar' %>
-<% end %>
\ No newline at end of file
+<% end %>
--- /dev/null
+<div class="wiki">
+ <% cache "wiki/show/#{content.page.id}/#{content.version}" do %>
+ <%= textilizable content.text, :attachments => content.page.attachments %>
+ <% end %>
+</div>
<hr />
<% end %>
-<div class="wiki">
-<% cache "wiki/show/#{@page.id}/#{@content.version}" do %>
-<%= textilizable @content.text, :attachments => @page.attachments %>
-<% end %>
-</div>
+<%= render(:partial => "wiki/content", :locals => {:content => @content}) %>
<%= link_to_attachments @page.attachments, :delete_url => (authorize_for('wiki', 'destroy_attachment') ? {:controller => 'wiki', :action => 'destroy_attachment', :page => @page.title} : nil) %>
--- /dev/null
+class AddVersionsWikiPageTitle < ActiveRecord::Migration
+ def self.up
+ add_column :versions, :wiki_page_title, :string
+ end
+
+ def self.down
+ remove_column :versions, :wiki_page_title
+ end
+end
label_wiki: Wiki
label_wiki_edit: Wiki редакция
label_wiki_edit_plural: Wiki редакции
+label_wiki_page: Wiki page
label_wiki_page_plural: Wiki pages
label_page_index: Индекс
label_current_version: Текуща версия
label_wiki: Wiki
label_wiki_edit: Wiki Bearbeitung
label_wiki_edit_plural: Wiki Bearbeitungen
+label_wiki_page: Wiki page
label_wiki_page_plural: Wiki pages
label_page_index: Index
label_current_version: Gegenwärtige Version
label_wiki: Wiki
label_wiki_edit: Wiki edit
label_wiki_edit_plural: Wiki edits
+label_wiki_page: Wiki page
label_wiki_page_plural: Wiki pages
label_page_index: Index
label_current_version: Current version
label_wiki: Wiki
label_wiki_edit: Wiki edit
label_wiki_edit_plural: Wiki edits
+label_wiki_page: Wiki page
label_wiki_page_plural: Wiki pages
label_page_index: Índice
label_current_version: Versión actual
label_wiki: Wiki
label_wiki_edit: Révision wiki
label_wiki_edit_plural: Révisions wiki
+label_wiki_page: Page wiki
label_wiki_page_plural: Pages wiki
label_page_index: Index
label_current_version: Version actuelle
label_wiki: Wiki
label_wiki_edit: Modifica Wiki
label_wiki_edit_plural: Modfiche wiki
+label_wiki_page: Wiki page
label_wiki_page_plural: Wiki pages
label_page_index: Indice
label_current_version: Versione corrente
label_wiki: Wiki
label_wiki_edit: Wiki編集
label_wiki_edit_plural: Wiki編集
+label_wiki_page: Wiki page
label_wiki_page_plural: Wikiページ
label_page_index: 索引
label_current_version: 最新版
label_wiki: Wiki
label_wiki_edit: Wiki edit
label_wiki_edit_plural: Wiki edits
+label_wiki_page: Wiki page
label_wiki_page_plural: Wiki pages
label_page_index: Index
label_current_version: Huidige versie
label_wiki: Wiki\r
label_wiki_edit: Wiki edit\r
label_wiki_edit_plural: Wiki edits\r
+label_wiki_page: Wiki page\r
label_wiki_page_plural: Wiki pages\r
label_page_index: Index\r
label_current_version: Versao atual\r
label_wiki: Wiki
label_wiki_edit: Wiki edit
label_wiki_edit_plural: Wiki edits
+label_wiki_page: Wiki page
label_wiki_page_plural: Wiki pages
label_page_index: Index
label_current_version: Versão atual
label_wiki: Wiki
label_wiki_edit: Wiki editera
label_wiki_edit_plural: Wiki editeringar
+label_wiki_page: Wiki page
+label_wiki_page_plural: Wiki pages
label_page_index: Index
label_current_version: Nuvarande version
label_preview: Preview