Patch #13234 ยป create_wiki_for_layman.diff
| public/javascripts/application.js (working copy) | ||
|---|---|---|
| 588 | 588 |
$(document).ready(setupAjaxIndicator); |
| 589 | 589 |
$(document).ready(hideOnLoad); |
| 590 | 590 |
$(document).ready(addFormObserversForDoubleSubmit); |
| 591 | ||
| 592 | ||
| 593 |
function create_new_wiki(project_name){
|
|
| 594 |
wiki_title = document.getElementById('create_new_wiki').value;
|
|
| 595 |
if(wiki_title == "") |
|
| 596 |
{
|
|
| 597 |
alert('"Title of new wiki" cannot be blank');
|
|
| 598 |
return; |
|
| 599 |
} |
|
| 600 | ||
| 601 |
uri = '/projects/' + project_name + '/wiki/' + wiki_title; |
|
| 602 |
//redirect to the page |
|
| 603 |
window.location.href = uri; |
|
| 604 |
} |
|
| app/views/wiki/_sidebar.html.erb (working copy) | ||
|---|---|---|
| 6 | 6 | |
| 7 | 7 |
<%= link_to l(:field_start_page), {:action => 'show', :id => nil} %><br />
|
| 8 | 8 |
<%= link_to l(:label_index_by_title), {:action => 'index'} %><br />
|
| 9 |
<%= link_to l(:label_index_by_date), {:controller => 'wiki', :project_id => @project, :action => 'date_index'} %><br />
|
|
| 9 |
<%= link_to l(:label_index_by_date), {:controller => 'wiki', :project_id => @project, :action => 'date_index'} %><br /><br/><br/>
|
|
| 10 | ||
| 11 |
<%= 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}')" %><br />
|
|
| 12 |
<em><%= l(:text_unallowed_characters) %>: , . / ? ; : |</em> <br /> |
|
| 13 | ||
| config/locales/en.yml (working copy) | ||
|---|---|---|
| 285 | 285 |
field_comments: Comment |
| 286 | 286 |
field_url: URL |
| 287 | 287 |
field_start_page: Start page |
| 288 |
field_create_page: Create Wiki |
|
| 289 |
new_page_hint: Enter Title of new wiki |
|
| 288 | 290 |
field_subproject: Subproject |
| 289 | 291 |
field_hours: Hours |
| 290 | 292 |
field_activity: Activity |