/usr/lib/python2.7/dist-packages/sagenb/data/sage/html/notebook/cell.html is in python-sagenb 1.0.1+ds1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | {#
INPUT:
- ``cell`` -- Cell instance
- ``wrap`` - an integer stating column position to wrap lines. Defaults to
configuration if not given.
- ``div_wrap`` - a boolean stating whether to wrap ``div``.
- ``do_print`` - a boolean stating whether the HTML is for
print or not.
- ``publish`` - a boolean; whether this is a published cell
#}
{% if do_print %}
{% set wrap_ = 68 %}
{% set div_wrap_ = true %}
{% else %}
{% set wrap_ = wrap %}
{% set div_wrap_ = div_wrap %}
{% endif %}
{% set cell_cls = "cell_evaluated" if cell.evaluated() or do_print or publish else "cell_not_evaluated" %}
{% if div_wrap_ %}
<div id="cell_outer_{{ cell.id() }}" class="cell_visible">
<div id="cell_{{ cell.id() }}" class="{{ cell_cls }}">
{% endif %}
{% if 'hideall' not in cell.percent_directives() %}
{# input #}
{% if not do_print and not publish %}
<div class="insert_new_cell" id="insert_new_cell_before{{ cell.id() }}">
<div class="ui-icon ui-icon-circle-plus wksht-icon_button"
id="insert_new_compute_cell_before{{ cell.id() }}"
title="{{ gettext('Click to insert new compute cell.') }}"></div>
{% if not cell.worksheet().docbrowser() %}
<div class="ui-icon ui-icon-comment wksht-icon_button"
id="insert_new_text_cell_before{{ cell.id() }}"
title="{{ gettext('Click to insert new rich-text cell.') }}"></div>
{% endif %}
<div class="legacy_insert_new_cell" id="legacy_new_cell_before{{ cell.id() }}"></div>
</div>
<script type="text/javascript">
$("#insert_new_compute_cell_before{{ cell.id() }}").bind("click",function (e) {
insert_new_cell_before({{ '%r'|format(cell.id()) }});
});
{% if not cell.worksheet().docbrowser() %}
$("#insert_new_text_cell_before{{ cell.id() }}").bind("click",function (e) {
insert_new_text_cell_before({{ '%r'|format(cell.id()) }});
});
$("#legacy_new_cell_before{{ cell.id() }}").bind("click",function (e) {
if (e.shiftKey){
insert_new_text_cell_before({{ '%r'|format(cell.id()) }});
} else {
insert_new_cell_before({{ '%r'|format(cell.id()) }});
}
});
{% endif %}
</script>
{% endif %}
{% if 'hide' in cell.percent_directives() %}
{% set input_cls = 'cell_input_hide' %}
{% else %}
{% set input_cls = 'cell_input' %}
{% endif %}
{% if publish and conf['pub_interact'] %}
{# We don't condition on interact cells here, for the sake of a uniform appearance. #}
<textarea class="{{ input_cls }}" rows="{{ (1, cell.input_text().strip()|number_of_rows(80))|max }}"
cols="80"
readonly="yes"
id="cell_input_{{ cell.id() }}"
>{{ cell.input_text().rstrip() }}</textarea>
{% if cell.is_interactive_cell() %}
<a href="javascript:evaluate_cell({{ '%r'|format(cell.id()) }}, 0);"
class="eval_button_active"
id="eval_button{{ cell.id() }}"
title="Click here to reset this interactive cell">
reset
</a>
{% endif %}
{% elif do_print or publish %}
<div class="cell_input_print">{{ cell.input_text().rstrip() }} </div>
{% else %}
<textarea class="{{ input_cls }}" rows="{{ (1, cell.input_text().strip()|number_of_rows(80))|max }}"
cols="80" spellcheck="false"
id="cell_input_{{ cell.id() }}">{{ cell.input_text().rstrip() }}</textarea>
<input type="button"
class="eval_button"
id="eval_button{{ cell.id() }}"
title="{{ gettext('Click here or press shift-return to evaluate') }}"
value="{{ gettext('evaluate') }}" />
{% endif %}
{# end input #}
<div id="introspect_div_{{ cell.id() }}" class="introspection"></div>
{% endif %}
{% if do_print and cell.cell_output_type() == 'hidden' %}
<pre>
</pre>
{% else %}
{% set output_cls = 'cell_div_output_running' if cell.computing() else 'cell_div_output_' + cell.cell_output_type() %}
<div class="cell_output_div">
<table class="cell_output_box">
<tr>
<td class="cell_number" id="cell_number_{{ cell.id() }}"
{{ '' if do_print else 'onClick=cycle_cell_output_type(%r);'|format(cell.id()) }} >
{% for i in range(7) %} {% endfor %}
</td>
<td class="output_cell">
<div class="{{ output_cls }}" id="cell_div_output_{{ cell.id() }}">
<div class="cell_output_{{ "print_" if do_print else '' }}{{ cell.cell_output_type() }}"
id="cell_output_{{ cell.id() }}">
{% if cell.introspect() %}
{{ cell.output_text(0, html=true) | safe }}
{% else %}
{{ cell.output_text(wrap_, html=true) | safe }}
{% endif %}
</div>
{% if not do_print %}
<div class="cell_output_{{ 'print_' if do_print else '' }}nowrap_{{ cell.cell_output_type() }}"
id="cell_output_nowrap_{{ cell.id() }}">
{{ cell.output_text(0, html=true) | safe }}
</div>
{% endif %}
<div class="cell_output_html_{{ cell.cell_output_type() }}"
id="cell_output_html_{{ cell.id() }}">
{{ cell.output_html() | safe }}
</div>
</div>
</td>
</tr>
</table>
</div>
{% endif %}
{% if div_wrap_ %}
</div>
</div>
{% endif %}
|