Django

Code

Changeset 9199

Show
Ignore:
Timestamp:
10/07/08 10:36:02 (2 months ago)
Author:
jacob
Message:

[djangoproject.com] added a note to the new doc pages when you get redirected from the old ones.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • djangoproject.com/djangodocs/templates/docs/doc.html

    r9096 r9199  
    2828      width: 18em; 
    2929    } 
     30    div#old-docs-warning { 
     31      background-color:#FFFFAA; 
     32      font-size:1.2em; 
     33      line-height:1.3em; 
     34      border: 2px solid #d00; 
     35      padding: .5em; 
     36      margin-top: 1em; 
     37    } 
     38    div#old-docs-warning h3, div#old-docs.warning p { 
     39      margin-top: 0; 
     40      padding: 0.2em 0; 
     41      color: black; 
     42    } 
    3043  </style> 
    3144  <link rel="stylesheet" href="http://media.djangoproject.com/css/pygments.css" type="text/css" /> 
     
    3952 
    4053{% block body %} 
     54  {% if redirect_from %} 
     55    <div id="old-docs-warning"> 
     56      <h3>Welcome to the new documentation.</h3> 
     57      <p> 
     58        We've recently reorganized the documentation, and you requested an 
     59        out-of-date page. We've tried to redirect you to the right place, but we 
     60        might have gotten it wrong. If you can't find what you're looking for 
     61        here, you might try <a href="{{ home }}/search/">searching for it</a>. 
     62      </p> 
     63    </div> 
     64  {% endif %} 
    4165  {{ doc.body|safe }} 
    4266{% endblock %} 
     
    111135          <a href="{{ home }}">{{ env.docstitle }}</a> 
    112136          {% for p in doc.parents %} 
    113             <ul><li><a href="{{ p.link }}">{{ p.title }}</a> 
     137            <ul><li><a href="{{ p.link }}">{{ p.title|safe }}</a> 
    114138          {% endfor %} 
    115           <ul><li>{% block current-page-title %}{{ doc.title }}{% endblock %}</li></ul> 
     139          <ul><li>{% block current-page-title %}{{ doc.title|safe }}{% endblock %}</li></ul> 
    116140          {% for p in doc.parents %}</li></ul>{% endfor %} 
    117141        </li> 
  • djangoproject.com/djangodocs/views.py

    r9111 r9199  
    5050        'home': urlresolvers.reverse('document-index', kwargs={'lang':lang, 'version':version}), 
    5151        'search': urlresolvers.reverse('document-search', kwargs={'lang':lang, 'version':version}), 
     52        'redirect_from': request.GET.get('from', None), 
    5253    })) 
    5354