wiki branch merged into trunk
git-svn-id: http://redmine.rubyforge.org/svn/trunk@323 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -91,6 +91,7 @@
|
||||
<%= link_to l(:label_change_log), {:controller => 'projects', :action => 'changelog', :id => @project }, :class => "menuItem" %>
|
||||
<%= link_to l(:label_roadmap), {:controller => 'projects', :action => 'roadmap', :id => @project }, :class => "menuItem" %>
|
||||
<%= link_to l(:label_document_plural), {:controller => 'projects', :action => 'list_documents', :id => @project }, :class => "menuItem" %>
|
||||
<%= link_to l(:label_wiki), {:controller => 'wiki', :id => @project, :page => nil }, :class => "menuItem" if @project.wiki and !@project.wiki.new_record? %>
|
||||
<%= link_to l(:label_member_plural), {:controller => 'projects', :action => 'list_members', :id => @project }, :class => "menuItem" %>
|
||||
<%= link_to l(:label_attachment_plural), {:controller => 'projects', :action => 'list_files', :id => @project }, :class => "menuItem" %>
|
||||
<%= link_to l(:label_search), {:controller => 'projects', :action => 'search', :id => @project }, :class => "menuItem" %>
|
||||
@@ -115,6 +116,7 @@
|
||||
<li><%= link_to l(:label_change_log), :controller => 'projects', :action => 'changelog', :id => @project %></li>
|
||||
<li><%= link_to l(:label_roadmap), :controller => 'projects', :action => 'roadmap', :id => @project %></li>
|
||||
<li><%= link_to l(:label_document_plural), :controller => 'projects', :action => 'list_documents', :id => @project %></li>
|
||||
<li><%= link_to l(:label_wiki), :controller => 'wiki', :id => @project, :page => nil if @project.wiki and !@project.wiki.new_record? %></li>
|
||||
<li><%= link_to l(:label_member_plural), :controller => 'projects', :action => 'list_members', :id => @project %></li>
|
||||
<li><%= link_to l(:label_attachment_plural), :controller => 'projects', :action => 'list_files', :id => @project %></li>
|
||||
<li><%= link_to l(:label_search), :controller => 'projects', :action => 'search', :id => @project %></li>
|
||||
|
||||
@@ -38,6 +38,20 @@
|
||||
<%= javascript_tag "Element.hide('repository');" if @project.repository.nil? %>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<h3><%= check_box_tag "wiki_enabled", 1, !@project.wiki.nil?, :onclick => "Element.toggle('wiki');" %> <%= l(:label_wiki) %></h3>
|
||||
<%= hidden_field_tag "wiki_enabled", 0 %>
|
||||
<div id="wiki">
|
||||
<% fields_for :wiki, @project.wiki, { :builder => TabularFormBuilder, :lang => current_language} do |wiki| %>
|
||||
<p><%= wiki.text_field :start_page, :size => 60, :required => true %></p>
|
||||
<% # content_tag("div", "", :id => "wiki_start_page_auto_complete", :class => "auto_complete") +
|
||||
# auto_complete_field("wiki_start_page", { :url => { :controller => 'wiki', :action => 'auto_complete_for_wiki_page', :id => @project } })
|
||||
%>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= javascript_tag "Element.hide('wiki');" if @project.wiki.nil? %>
|
||||
</div>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'calendar/calendar' %>
|
||||
<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %>
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
<p><label><%= l(:setting_text_formatting) %></label>
|
||||
<%= select_tag 'settings[text_formatting]', options_for_select( [[l(:label_none), 0], ["textile", "textile"]], Setting.text_formatting) %></p>
|
||||
|
||||
<p><label><%= l(:setting_wiki_compression) %></label>
|
||||
<%= select_tag 'settings[wiki_compression]', options_for_select( [[l(:label_none), 0], ["gzip", "gzip"]], Setting.wiki_compression) %></p>
|
||||
|
||||
</div>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<% end %>
|
||||
@@ -0,0 +1,3 @@
|
||||
<fieldset class="preview"><legend><%= l(:label_preview) %></legend>
|
||||
<%= textilizable @text %>
|
||||
</fieldset>
|
||||
@@ -0,0 +1,39 @@
|
||||
<div class="contextual">
|
||||
<%= link_to(l(:label_page_index), {:action => 'special', :page => 'Page_index'}, :class => 'icon icon-index') %>
|
||||
</div>
|
||||
|
||||
<h2><%= @page.pretty_title %></h2>
|
||||
|
||||
<% form_for :content, @content, :url => {:action => 'edit', :page => @page.title}, :html => {:id => 'wiki_form'} do |f| %>
|
||||
<%= error_messages_for 'content' %>
|
||||
<p><%= f.text_area :text, :cols => 100, :rows => 25, :style => "width:99%;" %></p>
|
||||
<p><label><%= l(:field_comment) %></label><br /><%= f.text_field :comment, :size => 120 %></p>
|
||||
<p><%= submit_tag l(:button_save) %>
|
||||
<%= link_to_remote l(:label_preview),
|
||||
{ :url => { :controller => 'wiki', :action => 'preview' },
|
||||
:method => 'get',
|
||||
:update => 'preview',
|
||||
:with => "Form.serialize('wiki_form')",
|
||||
:loading => "Element.show('indicator')",
|
||||
:loaded => "Element.hide('indicator')"
|
||||
} %>
|
||||
<span id="indicator" style="display:none"><%= image_tag "loading.gif", :align => "absmiddle" %></span>
|
||||
</p>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% if Setting.text_formatting == 'textile' %>
|
||||
<%= javascript_include_tag 'jstoolbar' %>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
if (document.getElementById) {
|
||||
if (document.getElementById('content_text')) {
|
||||
var commentTb = new jsToolBar(document.getElementById('content_text'));
|
||||
commentTb.draw();
|
||||
}
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
<% end %>
|
||||
|
||||
<div id="preview" class="wiki"></div>
|
||||
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title><%=h @page.pretty_title %></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<style>
|
||||
body { font:80% Verdana,Tahoma,Arial,sans-serif; }
|
||||
h1, h2, h3, h4 { font-family: Trebuchet MS,Georgia,"Times New Roman",serif; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<%= textilizable @content.text, :wiki_links => :local %>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title><%=h @wiki.project.name %></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<style>
|
||||
body { font:80% Verdana,Tahoma,Arial,sans-serif; }
|
||||
h1, h2, h3, h4 { font-family: Trebuchet MS,Georgia,"Times New Roman",serif; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<strong><%= l(:label_page_index) %></strong>
|
||||
<ul>
|
||||
<% @pages.each do |page| %>
|
||||
<li><a href="#<%= page.title %>"><%= page.pretty_title %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<% @pages.each do |page| %>
|
||||
<hr />
|
||||
<%= textilizable page.content.text, :wiki_links => :anchor %>
|
||||
<% end %>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,28 @@
|
||||
<div class="contextual">
|
||||
<%= link_to(l(:label_page_index), {:action => 'special', :page => 'Page_index'}, :class => 'icon icon-index') %>
|
||||
</div>
|
||||
|
||||
<h2><%= @page.pretty_title %></h2>
|
||||
|
||||
<h3><%= l(:label_history) %></h3>
|
||||
|
||||
<table class="list">
|
||||
<thead><tr>
|
||||
<th>#</th>
|
||||
<th><%= l(:field_updated_on) %></th>
|
||||
<th><%= l(:field_author) %></th>
|
||||
<th><%= l(:field_comment) %></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% @versions.each do |ver| %>
|
||||
<tr class="<%= cycle("odd", "even") %>">
|
||||
<th align="center"><%= link_to ver.version, :action => 'index', :page => @page.title, :version => ver.version %></th>
|
||||
<td align="center"><%= format_time(ver.updated_on) %></td>
|
||||
<td><em><%= ver.author ? ver.author.name : "anonyme" %></em></td>
|
||||
<td><%=h ver.comment %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><%= link_to l(:button_back), :action => 'index', :page => @page.title %></p>
|
||||
@@ -0,0 +1,30 @@
|
||||
<div class="contextual">
|
||||
<%= link_to(l(:button_edit), {:action => 'edit', :page => @page.title}, :class => 'icon icon-edit') if @content.version == @page.content.version %>
|
||||
<%= link_to(l(:label_history), {:action => 'history', :page => @page.title}, :class => 'icon icon-history') %>
|
||||
<%= link_to(l(:label_page_index), {:action => 'special', :page => 'Page_index'}, :class => 'icon icon-index') %>
|
||||
</div>
|
||||
|
||||
<% if @content.version != @page.content.version %>
|
||||
<p>
|
||||
<%= link_to(('« ' + l(:label_previous)), :action => 'index', :page => @page.title, :version => (@content.version - 1)) + " - " if @content.version > 1 %>
|
||||
<%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %> -
|
||||
<%= link_to((l(:label_next) + ' »'), :action => 'index', :page => @page.title, :version => (@content.version + 1)) + " - " if @content.version < @page.content.version %>
|
||||
<%= link_to(l(:label_current_version), :action => 'index', :page => @page.title) %>
|
||||
<br />
|
||||
<em><%= @content.author ? @content.author.name : "anonyme" %>, <%= format_time(@content.updated_on) %> </em><br />
|
||||
<%=h @content.comment %>
|
||||
</p>
|
||||
<hr />
|
||||
<% end %>
|
||||
|
||||
<div class="wiki">
|
||||
<% cache "wiki/show/#{@page.id}/#{@content.version}" do %>
|
||||
<%= textilizable @content.text %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="contextual">
|
||||
<%= l(:label_export_to) %>
|
||||
<%= link_to 'HTML', {:export => 'html', :version => @content.version}, :class => 'icon icon-html' %>,
|
||||
<%= link_to 'TXT', {:export => 'txt', :version => @content.version}, :class => 'icon icon-txt' %>
|
||||
</div>
|
||||
@@ -0,0 +1,13 @@
|
||||
<div class="contextual">
|
||||
<% unless @pages.empty? %>
|
||||
<%= l(:label_export_to) %> <%= link_to 'HTML', {:action => 'special', :page => 'export'}, :class => 'icon icon-html' %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h2><%= l(:label_page_index) %></h2>
|
||||
|
||||
<% if @pages.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %>
|
||||
<ul><% @pages.each do |page| %>
|
||||
<li><%= link_to page.pretty_title, :action => 'index', :page => page.title %> -
|
||||
<%= l(:label_last_updates) %>: <%= format_time(page.updated_on) %></li>
|
||||
<% end %></ul>
|
||||
Reference in New Issue
Block a user