##// END OF EJS Templates
Sligth changes to wiki views....
Jean-Philippe Lang -
r762:f2a5304d648f
parent child
Show More
@@ -1,19 +1,18
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to(l(:button_edit), {:action => 'edit', :page => @page.title}, :class => 'icon icon-edit') %>
2 <%= link_to(l(:button_edit), {:action => 'edit', :page => @page.title}, :class => 'icon icon-edit') %>
3 <%= link_to(l(:label_history), {:action => 'history', :page => @page.title}, :class => 'icon icon-history') %>
3 <%= link_to(l(:label_history), {:action => 'history', :page => @page.title}, :class => 'icon icon-history') %>
4 <%= link_to(l(:label_page_index), {:action => 'special', :page => 'Page_index'}, :class => 'icon icon-index') %>
5 </div>
4 </div>
6
5
7 <h2><%= @page.pretty_title %></h2>
6 <h2><%= @page.pretty_title %></h2>
8
7
9 <p>
8 <p>
10 <%= l(:label_version) %> <%= link_to @diff.content_from.version, :action => 'index', :page => @page.title, :version => @diff.content_from.version %>
9 <%= l(:label_version) %> <%= link_to @diff.content_from.version, :action => 'index', :page => @page.title, :version => @diff.content_from.version %>
11 <em>(<%= @diff.content_from.author ? @diff.content_from.author.name : "anonyme" %>, <%= format_time(@diff.content_from.updated_on) %>)</em>
10 <em>(<%= @diff.content_from.author ? @diff.content_from.author.name : "anonyme" %>, <%= format_time(@diff.content_from.updated_on) %>)</em>
12 &#8594;
11 &#8594;
13 <%= l(:label_version) %> <%= link_to @diff.content_to.version, :action => 'index', :page => @page.title, :version => @diff.content_to.version %>/<%= @page.content.version %>
12 <%= l(:label_version) %> <%= link_to @diff.content_to.version, :action => 'index', :page => @page.title, :version => @diff.content_to.version %>/<%= @page.content.version %>
14 <em>(<%= @diff.content_to.author ? @diff.content_to.author.name : "anonyme" %>, <%= format_time(@diff.content_to.updated_on) %>)</em>
13 <em>(<%= @diff.content_to.author ? @diff.content_to.author.name : "anonyme" %>, <%= format_time(@diff.content_to.updated_on) %>)</em>
15 </p>
14 </p>
16
15
17 <hr />
16 <hr />
18
17
19 <%= html_diff(@diff) %>
18 <%= html_diff(@diff) %>
@@ -1,35 +1,31
1 <div class="contextual">
2 <%= link_to(l(:label_page_index), {:action => 'special', :page => 'Page_index'}, :class => 'icon icon-index') %>
3 </div>
4
5 <h2><%= @page.pretty_title %></h2>
1 <h2><%= @page.pretty_title %></h2>
6
2
7 <% form_for :content, @content, :url => {:action => 'edit', :page => @page.title}, :html => {:id => 'wiki_form'} do |f| %>
3 <% form_for :content, @content, :url => {:action => 'edit', :page => @page.title}, :html => {:id => 'wiki_form'} do |f| %>
8 <%= f.hidden_field :version %>
4 <%= f.hidden_field :version %>
9 <%= error_messages_for 'content' %>
5 <%= error_messages_for 'content' %>
10 <div class="contextual">
6 <div class="contextual">
11 <%= l(:setting_text_formatting) %>:
7 <%= l(:setting_text_formatting) %>:
12 <%= link_to l(:label_help), {:controller => 'help', :ctrl => 'wiki', :page => 'syntax' },
8 <%= link_to l(:label_help), {:controller => 'help', :ctrl => 'wiki', :page => 'syntax' },
13 :onclick => "window.open('#{ url_for :controller => 'help', :ctrl => 'wiki', :page => 'syntax' }', '', 'resizable=yes, location=no, width=300, height=500, menubar=no, status=no, scrollbars=yes'); return false;" %>
9 :onclick => "window.open('#{ url_for :controller => 'help', :ctrl => 'wiki', :page => 'syntax' }', '', 'resizable=yes, location=no, width=300, height=500, menubar=no, status=no, scrollbars=yes'); return false;" %>
14 </div>
10 </div>
15 <p><%= f.text_area :text, :cols => 100, :rows => 25, :class => 'wiki-edit' %></p>
11 <p><%= f.text_area :text, :cols => 100, :rows => 25, :class => 'wiki-edit' %></p>
16 <p><label><%= l(:field_comments) %></label><br /><%= f.text_field :comments, :size => 120 %></p>
12 <p><label><%= l(:field_comments) %></label><br /><%= f.text_field :comments, :size => 120 %></p>
17 <p><%= submit_tag l(:button_save) %>
13 <p><%= submit_tag l(:button_save) %>
18 <%= link_to_remote l(:label_preview),
14 <%= link_to_remote l(:label_preview),
19 { :url => { :controller => 'wiki', :action => 'preview', :id => @project, :page => @page.title },
15 { :url => { :controller => 'wiki', :action => 'preview', :id => @project, :page => @page.title },
20 :method => 'post',
16 :method => 'post',
21 :update => 'preview',
17 :update => 'preview',
22 :with => "Form.serialize('wiki_form')",
18 :with => "Form.serialize('wiki_form')",
23 :complete => "location.href='#preview-top'"
19 :complete => "location.href='#preview-top'"
24 } %></p>
20 } %></p>
25 <%= wikitoolbar_for 'content_text' %>
21 <%= wikitoolbar_for 'content_text' %>
26 <% end %>
22 <% end %>
27
23
28 <a name="preview-top"></a>
24 <a name="preview-top"></a>
29 <div id="preview" class="wiki"></div>
25 <div id="preview" class="wiki"></div>
30
26
31 <% content_for :header_tags do %>
27 <% content_for :header_tags do %>
32 <%= stylesheet_link_tag 'scm' %>
28 <%= stylesheet_link_tag 'scm' %>
33 <% end %>
29 <% end %>
34
30
35 <% set_html_title @page.pretty_title %>
31 <% set_html_title @page.pretty_title %>
@@ -1,27 +1,27
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
3 <head>
3 <head>
4 <title><%=h @wiki.project.name %></title>
4 <title><%=h @wiki.project.name %></title>
5 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
6 <style>
6 <style>
7 body { font:80% Verdana,Tahoma,Arial,sans-serif; }
7 body { font:80% Verdana,Tahoma,Arial,sans-serif; }
8 h1, h2, h3, h4 { font-family: Trebuchet MS,Georgia,"Times New Roman",serif; }
8 h1, h2, h3, h4 { font-family: Trebuchet MS,Georgia,"Times New Roman",serif; }
9 </style>
9 </style>
10 </head>
10 </head>
11 <body>
11 <body>
12
12
13 <strong><%= l(:label_page_index) %></strong>
13 <strong><%= l(:label_index_by_title) %></strong>
14 <ul>
14 <ul>
15 <% @pages.each do |page| %>
15 <% @pages.each do |page| %>
16 <li><a href="#<%= page.title %>"><%= page.pretty_title %></a></li>
16 <li><a href="#<%= page.title %>"><%= page.pretty_title %></a></li>
17 <% end %>
17 <% end %>
18 </ul>
18 </ul>
19
19
20 <% @pages.each do |page| %>
20 <% @pages.each do |page| %>
21 <hr />
21 <hr />
22 <a name="<%= page.title %>" />
22 <a name="<%= page.title %>" />
23 <%= textilizable page.content.text, :wiki_links => :anchor %>
23 <%= textilizable page.content.text, :wiki_links => :anchor %>
24 <% end %>
24 <% end %>
25
25
26 </body>
26 </body>
27 </html>
27 </html>
@@ -1,38 +1,34
1 <div class="contextual">
2 <%= link_to(l(:label_page_index), {:action => 'special', :page => 'Page_index'}, :class => 'icon icon-index') %>
3 </div>
4
5 <h2><%= @page.pretty_title %></h2>
1 <h2><%= @page.pretty_title %></h2>
6
2
7 <h3><%= l(:label_history) %></h3>
3 <h3><%= l(:label_history) %></h3>
8
4
9 <% form_tag({:action => "diff"}, :method => :get) do %>
5 <% form_tag({:action => "diff"}, :method => :get) do %>
10 <table class="list">
6 <table class="list">
11 <thead><tr>
7 <thead><tr>
12 <th>#</th>
8 <th>#</th>
13 <th></th>
9 <th></th>
14 <th></th>
10 <th></th>
15 <th><%= l(:field_updated_on) %></th>
11 <th><%= l(:field_updated_on) %></th>
16 <th><%= l(:field_author) %></th>
12 <th><%= l(:field_author) %></th>
17 <th><%= l(:field_comments) %></th>
13 <th><%= l(:field_comments) %></th>
18 </tr></thead>
14 </tr></thead>
19 <tbody>
15 <tbody>
20 <% show_diff = @versions.size > 1 %>
16 <% show_diff = @versions.size > 1 %>
21 <% line_num = 1 %>
17 <% line_num = 1 %>
22 <% @versions.each do |ver| %>
18 <% @versions.each do |ver| %>
23 <tr class="<%= cycle("odd", "even") %>">
19 <tr class="<%= cycle("odd", "even") %>">
24 <th align="center"><%= link_to ver.version, :action => 'index', :page => @page.title, :version => ver.version %></th>
20 <th align="center"><%= link_to ver.version, :action => 'index', :page => @page.title, :version => ver.version %></th>
25 <td align="center" width="1%"><%= radio_button_tag('version', ver.version, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < @versions.size) %></td>
21 <td align="center" width="1%"><%= radio_button_tag('version', ver.version, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < @versions.size) %></td>
26 <td align="center" width="1%"><%= radio_button_tag('version_from', ver.version, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('cb-#{line_num}').checked==true || $('version_from').value > #{ver.version}) {$('cb-#{line_num-1}').checked=true;}") if show_diff && (line_num > 1) %></td>
22 <td align="center" width="1%"><%= radio_button_tag('version_from', ver.version, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('cb-#{line_num}').checked==true || $('version_from').value > #{ver.version}) {$('cb-#{line_num-1}').checked=true;}") if show_diff && (line_num > 1) %></td>
27 <td align="center"><%= format_time(ver.updated_on) %></td>
23 <td align="center"><%= format_time(ver.updated_on) %></td>
28 <td><em><%= ver.author ? ver.author.name : "anonyme" %></em></td>
24 <td><em><%= ver.author ? ver.author.name : "anonyme" %></em></td>
29 <td><%=h ver.comments %></td>
25 <td><%=h ver.comments %></td>
30 </tr>
26 </tr>
31 <% line_num += 1 %>
27 <% line_num += 1 %>
32 <% end %>
28 <% end %>
33 </tbody>
29 </tbody>
34 </table>
30 </table>
35 <%= submit_tag l(:label_view_diff), :class => 'small' %>
31 <%= submit_tag l(:label_view_diff), :class => 'small' %>
36 <%= pagination_links_full @version_pages, :page_param => :p %>
32 <%= pagination_links_full @version_pages, :page_param => :p %>
37 [ <%= @version_pages.current.first_item %> - <%= @version_pages.current.last_item %> / <%= @version_count %> ]
33 [ <%= @version_pages.current.first_item %> - <%= @version_pages.current.last_item %> / <%= @version_count %> ]
38 <% end %>
34 <% end %>
@@ -1,21 +1,22
1 <h2><%= l(:label_index_by_title) %></h2>
1 <h2><%= l(:label_index_by_title) %></h2>
2
2
3 <% if @pages.empty? %>
3 <% if @pages.empty? %>
4 <p class="nodata"><%= l(:label_no_data) %></p>
4 <p class="nodata"><%= l(:label_no_data) %></p>
5 <% end %>
5 <% end %>
6
6
7 <ul><% @pages.each do |page| %>
7 <ul><% @pages.each do |page| %>
8 <li><%= link_to page.pretty_title, :action => 'index', :page => page.title %> -
8 <li><%= link_to page.pretty_title, {:action => 'index', :page => page.title},
9 <%= l(:label_last_updates) %>: <%= format_time(page.updated_on) %></li>
9 :title => l(:label_updated_time, distance_of_time_in_words(Time.now, page.updated_on)) %>
10 </li>
10 <% end %></ul>
11 <% end %></ul>
11
12
12 <% content_for :sidebar do %>
13 <% content_for :sidebar do %>
13 <%= render :partial => 'sidebar' %>
14 <%= render :partial => 'sidebar' %>
14 <% end %>
15 <% end %>
15
16
16 <div class="contextual">
17 <div class="contextual">
17 <% unless @pages.empty? %>
18 <% unless @pages.empty? %>
18 <%= l(:label_export_to) %> <%= link_to 'HTML', {:action => 'special', :page => 'export'}, :class => 'icon icon-html' %>
19 <%= l(:label_export_to) %> <%= link_to 'HTML', {:action => 'special', :page => 'export'}, :class => 'icon icon-html' %>
19 <% end %>
20 <% end %>
20 </div>
21 </div>
21 &nbsp;
22 &nbsp;
General Comments 0
You need to be logged in to leave comments. Login now