/usr/lib/python2.7/dist-packages/sagenb/data/sage/html/notebook/guest_worksheet_page.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 | {% extends "html/notebook/base.html" %}
{#
INPUT:
- worksheet - an instance of Worksheet
- notebook - an instance of Notebook which contains worksheet
- username - a string containing a username
#}
{% block javascript %}
{{ super() }}
<script src="/javascript/sage/js/published_worksheet.js"></script>
{% endblock %}
{% block page_id %}guest-worksheet-page{% endblock %}
{% block body_classes %}{% if conf['pub_interact'] %}active-worksheet{% endif %}{% endblock %}
{% set original_worksheet = worksheet.worksheet_that_was_published() %}
{% if original_worksheet.is_collaborator(username) or original_worksheet.is_owner(username) %}
{% set edit_text = "Edit this." %}
{% set edit_text = gettext('Edit this.') %}
{% set url = original_worksheet.worksheet_command('') %}
{% elif notebook.user_manager().user_is_guest(username) %}
{% set edit_text = gettext('Log in to edit a copy.') %}
{% set url = "/" %}
{% else %}
{% set edit_text = gettext('Edit a copy.') %}
{% set url = "edit_published_page" %}
{% endif %}
{% set download_name = worksheet.download_name() %}
{% block published_link_rel %}
<link rel="alternate" type="application/sage" title="{{ render_title() }}" href="download/{{ download_name }}.sws" />
{% endblock %}
{% block body %}
<ul class="controls">
<li><a href="{{ url }}">{{ edit_text }}</a></li>
<li><a href="download/{{ download_name }}.sws">{{ gettext('Download.') }}</a></li>
{% if worksheet.rating() != -1 or
not (notebook.user_manager().user_is_guest(username) or worksheet.is_publisher(username)) %}
<li>
{% if worksheet.rating() != -1 %}
<a class="usercontrol" href="rating_info">
{{ gettext('This page is rated %(wr).1f.', wr=worksheet.rating()) }}
</a>
{% endif %}
{% if not (notebook.user_manager().user_is_guest(username) or worksheet.is_publisher(username)) %}
<span>
</span>
{% for i in range(5) %}
<input type="radio" name="rating" value={{ i }} > {{ i }}
{% endfor %}
<input name="rating_comment" id="rating_comment" value="{{ gettext('leave a comment') }}"/>
<input type="button" id="rate_button" name="rating" value= {{ gettext("Rerate") if worksheet.is_rater(username) else gettext("Rate") }} >
{% endif %}
</li>
{% endif %}
<li><a href="/pub/">{{ gettext('Other published documents...') }}</a></li>
</ul>
<hr class="usercontrol" />
<h1 class="title">{{ worksheet.name() }}</h1>
<h2 class="lastedit">{{ worksheet.html_time_since_last_edited() | safe }}</h2>
{{ worksheet.html(do_print=false, publish=true, username=username) | safe }}
<script>
{%- if conf['pub_interact'] %}
cell_id_list = {{ worksheet.cell_id_list() }};
onload_id_list = {{ worksheet.onload_id_list() }};
ignore_all_jumps = true;
{%- else %}
MathJax.Hub.Process();
{%- endif %}
</script>
<hr class="usercontrol" />
{%- for i in range(10) %}
{%- endfor %}
{% endblock %}
|