@@ -499,6 +499,26 class ProjectsController < ApplicationController | |||
|
499 | 499 | @show_documents = 1 |
|
500 | 500 | end |
|
501 | 501 | |
|
502 | unless params[:show_wiki_edits] == "0" | |
|
503 | select = "#{WikiContent.versioned_table_name}.updated_on, #{WikiContent.versioned_table_name}.comment, " + | |
|
504 | "#{WikiContent.versioned_table_name}.#{WikiContent.version_column}, #{WikiPage.table_name}.title" | |
|
505 | joins = "LEFT JOIN #{WikiPage.table_name} ON #{WikiPage.table_name}.id = #{WikiContent.versioned_table_name}.page_id " + | |
|
506 | "LEFT JOIN #{Wiki.table_name} ON #{Wiki.table_name}.id = #{WikiPage.table_name}.wiki_id " | |
|
507 | conditions = ["#{Wiki.table_name}.project_id = ? AND #{WikiContent.versioned_table_name}.updated_on BETWEEN ? AND ?", | |
|
508 | @project.id, @date_from, @date_to] | |
|
509 | ||
|
510 | WikiContent.versioned_class.find(:all, :select => select, :joins => joins, :conditions => conditions).each { |i| | |
|
511 | # We provide this alias so all events can be treated in the same manner | |
|
512 | def i.created_on | |
|
513 | self.updated_on | |
|
514 | end | |
|
515 | ||
|
516 | @events_by_day[i.created_on.to_date] ||= [] | |
|
517 | @events_by_day[i.created_on.to_date] << i | |
|
518 | } | |
|
519 | @show_wiki_edits = 1 | |
|
520 | end | |
|
521 | ||
|
502 | 522 | render :layout => false if request.xhr? |
|
503 | 523 | end |
|
504 | 524 |
@@ -29,6 +29,10 class WikiPage < ActiveRecord::Base | |||
|
29 | 29 | end |
|
30 | 30 | |
|
31 | 31 | def pretty_title |
|
32 | title.tr '_', ' ' | |
|
32 | WikiPage.pretty_title(title) | |
|
33 | end | |
|
34 | ||
|
35 | def self.pretty_title(str) | |
|
36 | (str && str.is_a?(String)) ? str.tr('_', ' ') : str | |
|
33 | 37 | end |
|
34 | 38 | end |
@@ -9,7 +9,8 | |||
|
9 | 9 | <%= check_box_tag 'show_issues', 1, @show_issues %><%= hidden_field_tag 'show_issues', 0, :id => nil %> <%=l(:label_issue_plural)%><br /> |
|
10 | 10 | <%= check_box_tag 'show_news', 1, @show_news %><%= hidden_field_tag 'show_news', 0, :id => nil %> <%=l(:label_news_plural)%><br /> |
|
11 | 11 | <%= check_box_tag 'show_files', 1, @show_files %><%= hidden_field_tag 'show_files', 0, :id => nil %> <%=l(:label_attachment_plural)%><br /> |
|
12 | <%= check_box_tag 'show_documents', 1, @show_documents %><%= hidden_field_tag 'show_documents', 0, :id => nil %> <%=l(:label_document_plural)%> | |
|
12 | <%= check_box_tag 'show_documents', 1, @show_documents %><%= hidden_field_tag 'show_documents', 0, :id => nil %> <%=l(:label_document_plural)%><br /> | |
|
13 | <%= check_box_tag 'show_wiki_edits', 1, @show_wiki_edits %><%= hidden_field_tag 'show_wiki_edits', 0, :id => nil %> <%=l(:label_wiki_edit_plural)%> | |
|
13 | 14 | </p> |
|
14 | 15 | <p class="textcenter"><%= submit_tag l(:button_apply), :class => 'button-small' %></p> |
|
15 | 16 | <% end %> |
@@ -35,6 +36,9 | |||
|
35 | 36 | <i><%= e.author.name %></i> |
|
36 | 37 | <% elsif e.is_a? Document %> |
|
37 | 38 | <%= e.created_on.strftime("%H:%M") %> <%=l(:label_document)%>: <%= link_to h(e.title), :controller => 'documents', :action => 'show', :id => e %><br /> |
|
39 | <% elsif e.is_a? WikiContent.versioned_class %> | |
|
40 | <%= e.created_on.strftime("%H:%M") %> <%=l(:label_wiki_edit)%>: <%= link_to h(WikiPage.pretty_title(e.title)), :controller => 'wiki', :page => e.title %> (<%= link_to '#' + e.version.to_s, :controller => 'wiki', :page => e.title, :version => e.version %>)<br /> | |
|
41 | <% unless e.comment.blank? %><em><%=h e.comment %></em><% end %> | |
|
38 | 42 | <% end %> |
|
39 | 43 | </p></li> |
|
40 | 44 | |
@@ -56,4 +60,4 | |||
|
56 | 60 | %> |
|
57 | 61 | </div> |
|
58 | 62 | <br /> |
|
59 | </div> No newline at end of file | |
|
63 | </div> |
@@ -328,6 +328,8 label_result: %d Resultat | |||
|
328 | 328 | label_result_plural: %d Resultate |
|
329 | 329 | label_all_words: Alle Wörter |
|
330 | 330 | label_wiki: Wiki |
|
331 | label_wiki_edit: Wiki edit | |
|
332 | label_wiki_edit_plural: Wiki edits | |
|
331 | 333 | label_page_index: Index |
|
332 | 334 | label_current_version: Gegenwärtige Version |
|
333 | 335 | label_preview: Preview |
@@ -328,6 +328,8 label_result: %d result | |||
|
328 | 328 | label_result_plural: %d results |
|
329 | 329 | label_all_words: All words |
|
330 | 330 | label_wiki: Wiki |
|
331 | label_wiki_edit: Wiki edit | |
|
332 | label_wiki_edit_plural: Wiki edits | |
|
331 | 333 | label_page_index: Index |
|
332 | 334 | label_current_version: Current version |
|
333 | 335 | label_preview: Preview |
@@ -328,6 +328,8 label_result: %d resultado | |||
|
328 | 328 | label_result_plural: %d resultados |
|
329 | 329 | label_all_words: Todas las palabras |
|
330 | 330 | label_wiki: Wiki |
|
331 | label_wiki_edit: Wiki edit | |
|
332 | label_wiki_edit_plural: Wiki edits | |
|
331 | 333 | label_page_index: Índice |
|
332 | 334 | label_current_version: Versión actual |
|
333 | 335 | label_preview: Previo |
@@ -328,6 +328,8 label_result: %d résultat | |||
|
328 | 328 | label_result_plural: %d résultats |
|
329 | 329 | label_all_words: Tous les mots |
|
330 | 330 | label_wiki: Wiki |
|
331 | label_wiki_edit: Révision wiki | |
|
332 | label_wiki_edit_plural: Révisions wiki | |
|
331 | 333 | label_page_index: Index |
|
332 | 334 | label_current_version: Version actuelle |
|
333 | 335 | label_preview: Prévisualisation |
@@ -328,6 +328,8 label_result: %d risultato | |||
|
328 | 328 | label_result_plural: %d risultati |
|
329 | 329 | label_all_words: Tutte le parole |
|
330 | 330 | label_wiki: Wiki |
|
331 | label_wiki_edit: Wiki edit | |
|
332 | label_wiki_edit_plural: Wiki edits | |
|
331 | 333 | label_page_index: Indice |
|
332 | 334 | label_current_version: Versione corrente |
|
333 | 335 | label_preview: Previsione |
General Comments 0
You need to be logged in to leave comments.
Login now