app/views/wiki/edit_menu.rhtml in Pimki-1.3.092 vs app/views/wiki/edit_menu.rhtml in Pimki-1.4.092

- old
+ new

@@ -1,48 +1,65 @@ -<% - @title = "Editing Left-Side Menu Options" - @content_width = 700 - @hide_navigation = true -%> -<%= sub_template "top" %> - -<%= render_markup_help %> - -<form id="editForm" action="../save_menu" method="post"> -<p>Please choose the format you prefer for the left-size menu:</p> -<p><input type="radio" name="type" value="linkers" <%= 'checked' if @menu_type == 'linkers' %>>Only pages that link other pages (default)</p> -<p><input type="radio" name="type" value="all" <%= 'checked' if @menu_type == 'all' %>>All Pages</p> -<p><input type="radio" name="type" value="revised" <%= 'checked' if @menu_type == 'revised' %>>Recently revised pages</p> -<p><input type="radio" name="type" value="recent" <%= 'checked' if @menu_type == 'recent' %>>Recently visited pages</p> -<p><input type="radio" name="type" value="viewed" <%= 'checked' if @menu_type == 'viewed' %>>Most viewed pages</p> -<p><input type="radio" name="type" value="category" <%= 'checked' if @menu_type == 'category' %>>Pages in a specific category: - <select id="category" name="category" size="1" style="width:190"> - <option value="noselect">------------ - <% for category in web.categories %> - <option value="<%= category %>"><%= category %> - <% end %> - </select> -</p> -<p>For the above options you can choose if you want to limit the number of results. Enter the number of items you wish, or 0 for all items: <input type="textfield" size="20", name="limit" value="<%= @list_limit %>" /></p> -<p><input type="radio" name="type" value="user" <%= 'checked' if @menu_type == 'user' %>>Or just write your own menu contents (as a regular Wiki page): - <textarea name="content" style="width: 400px; height: 300px"><%= @menu_content %></textarea> -</p> - -<table width="400px"> - <tr><td align="right"> - <small> - Enter system password - <input style="font-size:small;" type="password" id="system_password" name="system_password"> - and - <input type="submit" name='action' value="Update"> - </small> - </tr></td> - <tr><td align="right"> - <small> - ...or forget changes and <input type="submit" name='action' value="Cancel Update"> - </small> - </tr></td> -</table> - -</form> - +<% + @title = "Editing Left-Side Menu Options" + @content_width = 700 + @hide_navigation = true +%> +<%= sub_template "top" %> + +<%= render_markup_help %> + +<form id="editForm" action="../save_menu" method="post"> +<p>Please choose the format you prefer for the left-size menu:</p> +<p><input type="radio" name="type" value="linkers" <%= 'checked' if @menu_type == 'linkers' %>>Only pages that link other pages (default)</p> +<p><input type="radio" name="type" value="all" <%= 'checked' if @menu_type == 'all' %>>All Pages</p> +<p><input type="radio" name="type" value="revised" <%= 'checked' if @menu_type == 'revised' %>>Recently revised pages</p> +<p><input type="radio" name="type" value="recent" <%= 'checked' if @menu_type == 'recent' %>>Recently visited pages</p> +<p><input type="radio" name="type" value="viewed" <%= 'checked' if @menu_type == 'viewed' %>>Most viewed pages</p> +<p><input type="radio" name="type" value="category" <%= 'checked' if @menu_type == 'category' %>>Pages in a specific category: + <select id="category" name="category" size="1" style="width:190"> + <option value="noselect">------------ + <% for category in web.categories %> + <option value="<%= category %>"><%= category %> + <% end %> + </select> +</p> +<p>For the above options you can choose if you want to limit the number of results. Enter the number of items you wish, or 0 for all items: <input type="textfield" size="20", name="limit" value="<%= @list_limit %>" /></p> +<p><input type="radio" name="type" value="user" <%= 'checked' if @menu_type == 'user' %>>Or just write your own menu contents (as a regular Wiki page): + <textarea name="content" style="width: 400px; height: 300px"><%= @menu_content.content %></textarea> +</p> + +<% if Page === @menu_content && @menu_content.revisions.length > 1 + @menu_content.revisions.each_with_index do |rev, i| %> + <a href='.' onClick="forms.editForm.content.value = unescape('<%= CGI.escape(rev.content).gsub('+', ' ') %>'); return false;">Set menu content to revision <%= i %></a><br /> +<% end + end +%> + +<table width="400px"> + <tr align="right"> + <td> + <small>Updated by: <input type="text" name="author" id="authorName" + value="<%= @author || 'AnonymousCoward' %>" + onClick="this.value == 'AnonymousCoward' ? this.value = '' : true"> + </small> + </td> + </tr> + <tr><td>&nbsp;</td></tr> + <tr> + <td align="right"> + <small> + Enter system password + <input style="font-size:small;" type="password" id="system_password" name="system_password"> + and + <input type="submit" name='action' value="Update"> + </small> + </tr></td> + <tr><td align="right"> + <small> + ...or forget changes and <input type="submit" name='action' value="Cancel Update"> + </small> + </tr></td> +</table> + +</form> + <%= sub_template "bottom" %> \ No newline at end of file