# 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
|
|
1328 | 1328 | """ |
1329 | 1329 | worksheet = self.get_worksheet_with_filename(filename) |
1330 | 1330 | 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) |
1332 | 1333 | |
1333 | 1334 | |
1334 | 1335 | |
diff -r 070cb9209b51 -r fda4a0043658 sage/server/notebook/templates/notebook/beforepublish_window.html
a
|
b
|
|
11 | 11 | - sage_jsmath_macros - an array containing strings of Javascript of Sage macros for jsMath |
12 | 12 | #} |
13 | 13 | |
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>' %} |
15 | 15 | {% set select = "publish" %} |
16 | 16 | {% set backwards = true %} |
| 17 | No newline at end of file |
diff -r 070cb9209b51 -r fda4a0043658 sage/server/notebook/templates/notebook/worksheet.html
a
|
b
|
|
3 | 3 | INPUT: |
4 | 4 | - worksheet_name - a string containing a worksheet's name |
5 | 5 | - 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 |
6 | 8 | #} |
7 | 9 | {% extends "base.html" %} |
8 | 10 | |
diff -r 070cb9209b51 -r fda4a0043658 sage/server/notebook/templates/worksheet/published_worksheet.html
a
|
b
|
|
2 | 2 | INPUT: |
3 | 3 | - cell_id_list - a list of cell id's |
4 | 4 | - cells_html - string of cells HTML |
5 | | - do_print - a boolean |
6 | 5 | #} |
7 | 6 | {% set published = true %} |
8 | 7 | {% set do_print = true %} |
diff -r 070cb9209b51 -r fda4a0043658 sage/server/notebook/templates/worksheet/worksheet.html
a
|
b
|
|
10 | 10 | {% include "worksheet/worksheet_body.html" %} |
11 | 11 | |
12 | 12 | {% if do_print %} |
13 | | <script language=javascript>jsMath.ProcessBeforeShowing();</script> |
| 13 | <script language="javascript">jsMath.ProcessBeforeShowing();</script> |
14 | 14 | {% else %} |
15 | 15 | <script type="text/javascript">cell_id_list={{ cell_id_list }};</script> |
16 | 16 | {% endif %} |