wiki initial commit

git-svn-id: http://redmine.rubyforge.org/svn/branches/work@290 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2007-03-04 13:40:21 +00:00
1 parent c32c92bfa9
commit 003960b811
47 files changed
+1876 -4

No files matched your search

+2
View File
@@ -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>
+11
View File
@@ -36,6 +36,17 @@
<%= 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>
<% 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" %>
+26
View File
@@ -0,0 +1,26 @@
<div class="contextual">
<%= link_to('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} do |f| %>
<%= error_messages_for 'content' %>
<p><%= f.text_area :text, :cols => 100, :rows => 25 %></p>
<p><label><%= l(:field_comment) %></label><br /><%= f.text_field :comment, :size => 120 %></p>
<p><%= submit_tag l(:button_save) %></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 %>
+13
View File
@@ -0,0 +1,13 @@
<div class="contextual">
<%= link_to('Page index', {:action => 'special', :page => 'Page_index'}, :class => 'icon icon-index') %>
</div>
<h2><%= @page.pretty_title %></h2>
<h3><%= l(:label_history) %></h3>
<p><% @versions.each do |ver| %>
<%= link_to "#{ver.version}. #{format_time(ver.updated_on)}", :action => 'index', :page => @page.title, :version => ver.version %> <em>(<%= ver.author ? ver.author.name : "anonyme" %>)</em> <%= ver.comment %><br />
<% end %></p>
<p><%= link_to l(:button_back), :action => 'index', :page => @page.title %></p>
+24
View File
@@ -0,0 +1,24 @@
<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('Page index', {:action => 'special', :page => 'Page_index'}, :class => 'icon icon-index') %>
</div>
<h2><%= @page.pretty_title %></h2>
<% if @content.version != @page.content.version %>
<div class="box">
<div style="float:right;">
<%= link_to('Version actuelle', :action => 'index', :page => @page.title) %> (<%= @page.content.version %>)
<%= " - " + link_to(('&#171; ' + l(:label_previous)), :action => 'index', :page => @page.title, :version => (@content.version - 1)) if @content.version > 1 %>
<%= " - " + link_to((l(:label_next) + ' &#187;'), :action => 'index', :page => @page.title, :version => (@content.version + 1)) if @content.version < @page.content.version %>
</div>
<%= "Version #{@content.version} du #{format_time(@content.updated_on)}" %>
</div>
<% end %>
<div class="wiki">
<% cache :action => 'page', :id => @page.id, :ver => @content.version do %>
<%= textilizable @content.text %>
<% end %>
</div>
@@ -0,0 +1,7 @@
<h2>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>