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