Ticket #6568: sage-trac-6568.5.patch

File sage-trac-6568.5.patch, 4.3 KB (added by timdumol, 12 years ago)

Fixed a few bugs in templating.

  • sage/server/notebook/notebook.py

    # HG changeset patch
    # User Tim Dumol <tim@timdumol.com>
    # Date 1250239831 -28800
    # Node ID fda4a004365894c7d231df3aabf6af5d28ffcf5b
    # Parent  070cb9209b5155e4e043af7b37abd329ca09743e
    * Fixed a few bugs in templating.
    ** Fixed bug where `worksheet.html` was not passed the do_print argument.
    ** Fixed typo in `beforepublish_window.html`
    
    diff -r 070cb9209b51 -r fda4a0043658 sage/server/notebook/notebook.py
    a b  
    13281328        """
    13291329        worksheet = self.get_worksheet_with_filename(filename)
    13301330        return template("notebook/worksheet.html", worksheet_name = worksheet.name(),
    1331                  worksheet_html = worksheet.html(include_title=False, do_print=do_print))
     1331                 worksheet_html = worksheet.html(include_title=False, do_print=do_print),
     1332                        do_print = do_print)
    13321333
    13331334   
    13341335
  • sage/server/notebook/templates/notebook/beforepublish_window.html

    diff -r 070cb9209b51 -r fda4a0043658 sage/server/notebook/templates/notebook/beforepublish_window.html
    a b  
    1111- sage_jsmath_macros - an array containing strings of Javascript of Sage macros for jsMath
    1212#}
    1313
    14 {% set title = '<p>You can publish your worksheet to the Internet, where anyone will be able to access and view it online.</p><p>Your worksheet will be assigned a unique address (URL) that you can send to your friends and colleagues.</p><p>Do you want to publish this worksheet?</p><form method="get" action="."><input type="hidden" name="yes" value="" /><input type="submit" value="Yes" style="margin-left:10px" /><input type="button" value="No" style="margin-left:5px" onClick="parent.location=\\\'../\'"><br/><br/><input type="checkbox" name="auto" style="margin-left:13px" /> Automatically re-publish when changes are made</form>' %}
     14{% set title = '<p>You can publish your worksheet to the Internet, where anyone will be able to access and view it online.</p><p>Your worksheet will be assigned a unique address (URL) that you can send to your friends and colleagues.</p><p>Do you want to publish this worksheet?</p><form method="get" action="."><input type="hidden" name="yes" value="" /><input type="submit" value="Yes" style="margin-left:10px" /><input type="button" value="No" style="margin-left:5px" onClick="parent.location=\'../\'"><br/><br/><input type="checkbox" name="auto" style="margin-left:13px" /> Automatically re-publish when changes are made</form>' %}
    1515{% set select = "publish" %}
    1616{% set backwards = true %}
     17 No newline at end of file
  • sage/server/notebook/templates/notebook/worksheet.html

    diff -r 070cb9209b51 -r fda4a0043658 sage/server/notebook/templates/notebook/worksheet.html
    a b  
    33INPUT:
    44     - worksheet_name - a string containing a worksheet's name
    55     - worksheet_html - a string containing the html for a worksheet
     6     - do_print - a boolean stating whether to render a print version of the
     7                  worksheet
    68  #}
    79{% extends "base.html" %}
    810
  • sage/server/notebook/templates/worksheet/published_worksheet.html

    diff -r 070cb9209b51 -r fda4a0043658 sage/server/notebook/templates/worksheet/published_worksheet.html
    a b  
    22INPUT:
    33- cell_id_list - a list of cell id's
    44- cells_html - string of cells HTML
    5 - do_print - a boolean
    65#}
    76{% set published = true %}
    87{% set do_print = true %}
  • sage/server/notebook/templates/worksheet/worksheet.html

    diff -r 070cb9209b51 -r fda4a0043658 sage/server/notebook/templates/worksheet/worksheet.html
    a b  
    1010{% include "worksheet/worksheet_body.html" %}
    1111
    1212{% if do_print %}
    13 <script language=javascript>jsMath.ProcessBeforeShowing();</script>
     13<script language="javascript">jsMath.ProcessBeforeShowing();</script>
    1414{% else %}
    1515<script type="text/javascript">cell_id_list={{ cell_id_list }};</script>
    1616{% endif %}