Index: public/javascripts/application.js =================================================================== --- public/javascripts/application.js (revision 11442) +++ public/javascripts/application.js (working copy) @@ -588,3 +588,17 @@ $(document).ready(setupAjaxIndicator); $(document).ready(hideOnLoad); $(document).ready(addFormObserversForDoubleSubmit); + + +function create_new_wiki(project_name){ + wiki_title = document.getElementById('create_new_wiki').value; + if(wiki_title == "") + { + alert('"Title of new wiki" cannot be blank'); + return; + } + + uri = '/projects/' + project_name + '/wiki/' + wiki_title; + //redirect to the page + window.location.href = uri; +} Index: app/views/wiki/_sidebar.html.erb =================================================================== --- app/views/wiki/_sidebar.html.erb (revision 11442) +++ app/views/wiki/_sidebar.html.erb (working copy) @@ -6,4 +6,8 @@ <%= link_to l(:field_start_page), {:action => 'show', :id => nil} %>
<%= link_to l(:label_index_by_title), {:action => 'index'} %>
-<%= link_to l(:label_index_by_date), {:controller => 'wiki', :project_id => @project, :action => 'date_index'} %>
+<%= link_to l(:label_index_by_date), {:controller => 'wiki', :project_id => @project, :action => 'date_index'} %>


+ +<%= text_field_tag(:create_new_wiki, '', :placeholder => l(:new_page_hint), :size => "20") %> <%= button_to_function l(:field_create_page), "create_new_wiki('#{@project.identifier}')" %>
+<%= l(:text_unallowed_characters) %>: , . / ? ; : |
+ Index: config/locales/en.yml =================================================================== --- config/locales/en.yml (revision 11442) +++ config/locales/en.yml (working copy) @@ -285,6 +285,8 @@ field_comments: Comment field_url: URL field_start_page: Start page + field_create_page: Create Wiki + new_page_hint: Enter Title of new wiki field_subproject: Subproject field_hours: Hours field_activity: Activity