Changeset 719


Ignore:
Timestamp:
11/11/08 19:10:07 (5 years ago)
Author:
rcorsaro
Message:

fixed newpage logic to redirect to wikinewpage url for new pages

Location:
trunk/plugins/oforgeplugin/oforge
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/oforgeplugin/oforge/templates/wiki_newpage.html

    r69 r719  
    2323<!--! If page_name was passed display the warning message and use a hidden field --> 
    2424<py:choose test=""> 
    25 <py:when test="version == None"> 
     25<py:when test="page_name"> 
    2626<h2>Page does not exist</h2> 
    27 <p>The wiki page <span style="font-weight: bold">${page.name}</span> was not found.  Do you want to create it?</p> 
    28 <input type="hidden" name="page" value="${page.name}" /><br/> 
     27<p>The wiki page <span style="font-weight: bold">${page_name}</span> was not found.  Do you want to create it?</p> 
     28<input type="hidden" name="page" value="${page_name}" /><br/> 
    2929</py:when> 
    3030<py:otherwise> 
  • trunk/plugins/oforgeplugin/oforge/wikinewpage.py

    r203 r719  
    5252            if ''==data.get('action') and 0 == data['latest_version']: 
    5353                # show custom newpage for missing pages  
    54                 data.update(self._get_templates_data(req)) 
    55                 template = 'wiki_newpage.html' 
     54                req.redirect(req.href.newwikipage(req.args['page'])) 
    5655            elif 'edit'==data.get('action') and None == data.get('latest_version'): 
    5756                # copy the clone page source for new pages with 'clone' parameter 
Note: See TracChangeset for help on using the changeset viewer.