Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 364
- Log:
Hub integration and wider site design layout changes.
- Author:
- rool
- Date:
- Sat Mar 19 22:04:51 +0000 2011
- Size:
- 3688 Bytes
1 | <%- |
2 | @title = "Editing #{@page.name.escapeHTML}".html_safe |
3 | @content_width = 720 |
4 | @hide_navigation = true |
5 | -%> |
6 | |
7 | <h2>Edit page</h2> |
8 | |
9 | <p /> |
10 | <table cellspacing="0" cellpadding="0" border="0" style="border: none; text-align: left; width: auto;"> |
11 | <tr> |
12 | <th style="border: none; background: none; padding: 0 5px 0 0;">Links:</th> |
13 | <td style="border: none; padding: 0;">For links, images and so-on please use <a href="../show/Wiki" target="_blank">Wiki syntax</a>.</td> |
14 | </tr> |
15 | <tr> |
16 | <th style="border: none; background: none; padding: 0 5px 0 0;">Markup:</th> |
17 | <td style="border: none; padding: 0;">To mark up everything else please use <a href="http://www.redcloth.org/" target="_blank">Textile</a>.</td> |
18 | </tr> |
19 | </table> |
20 | |
21 | <% form_tag({ :action => 'save', :web => @web.address, :id => @page.name }, |
22 | { 'id' => 'editForm', 'method' => 'post', 'onsubmit' => 'cleanAuthorName()', |
23 | 'accept-charset' => 'utf-8' }) do %> |
24 | <div> |
25 | <textarea name="content" id="content" rows="24" cols="60"><%= h(flash[:content] || |
26 | (params['content'] ? params['content'] : @page.content).purify) %></textarea> |
27 | <% if @page_name != 'HomePage' -%> |
28 | <p> |
29 | <%= check_box_tag :alter_title, value = "1", checked=false, |
30 | 'onchange' => "toggleVisibility();" %> <label for="alter_title">Change page name.</label><br/> |
31 | <span id="title_change" style="display:none"><label for="new_name">New name:</label> <%= text_field_tag :new_name, h(@page.name.purify), |
32 | :onblur => "addRedirect();" %></span> |
33 | </p> |
34 | <% else -%> |
35 | <%= hidden_field_tag 'new_name', @page_name %> |
36 | <% end%> |
37 | <div id="editFormButtons"> |
38 | <input type="submit" value="Submit" accesskey="s"/> |
39 | <% |
40 | if false # 2011-03-14 (ADH): Hub integration - author comes from logged in user name |
41 | -%> |
42 | as |
43 | <%= text_field_tag :author, h(@author.purify), |
44 | :onfocus => "this.value == 'AnonymousCoward' ? this.value = '' : true;", |
45 | :onblur => "this.value == '' ? this.value = 'AnonymousCoward' : true" %> |
46 | <% end -%> |
47 | | |
48 | <span> |
49 | <%= link_to('Cancel', {:web => @web.address, :action => 'cancel_edit', :id => @page.name}, |
50 | {:accesskey => 'c'}) %> |
51 | <span class="unlock">(unlocks page)</span> |
52 | </span> |
53 | </div> |
54 | </div> |
55 | <%- end -%> |
56 | |
57 | <script type="text/javascript"> |
58 | <!--//--><![CDATA[//><!-- |
59 | function toggleVisibility() { |
60 | var span = document.getElementById('title_change'); |
61 | if (span.style.display =='inline') { |
62 | span.style.display ='none'; |
63 | document.getElementById('new_name').value = "<%= escape_javascript(@page.name) %>"; |
64 | var content = document.getElementById('content').value |
65 | document.getElementById('content').value = content.replace(/\[\[!redirects <%= Regexp.escape(@page.name).gsub('/', '\\/') %>\]\]\n/, '') |
66 | } |
67 | else |
68 | span.style.display ='inline' |
69 | } |
70 | |
71 | function addRedirect(){ |
72 | var e = document.getElementById('new_name').value; |
73 | if ( e != "<%= escape_javascript(@page.name) %>" && e != '') { |
74 | var content = document.getElementById('content'); |
75 | content.value = '[[!redirects <%= escape_javascript(@page.name) %>]]\n' + content.value |
76 | } |
77 | } |
78 | |
79 | function cleanAuthorName() { |
80 | if (document.getElementById('authorName').value == "") { |
81 | document.getElementById('authorName').value = 'AnonymousCoward'; |
82 | } |
83 | } |
84 | |
85 | document.forms["editForm"].elements["content"].focus(); |
86 | <%- if [:markdownMML, :markdownPNG, :markdown].include?(@web.markup) and !@page.categories.include?('S5-slideshow') -%> |
87 | setupSVGedit('<%= compute_public_path("editor/svg-editor.html", "svg-edit").split(/\?/)[0] %>'); |
88 | addS5button('<%= @page.name.escapeHTML %>'); |
89 | <%- end -%> |
90 | //--><!]]> |
91 | </script> |