{# INPUT: - original_worksheet - an instance of Worksheet - worksheet - an instance of Worksheet - notebook - an instance of Notebook which contains worksheet - worksheet_html - a string containing the html for the worksheet - username - a string containing a username #} {% if original_worksheet.is_collaborator(username) or original_worksheet.is_owner(username) %} {% set edit_text = "Edit this." %} {% set url = "edit_published_page" %} {% elif notebook.user_is_guest(username) %} {% set edit_text = "Log in to edit a copy." %} {% set url = "/" %} {% else %} {% set edit_text = "Edit a copy." %} {% set url = "edit_published_page" %} {% endif %} {% set download_name = os.path.split(worksheet.name())[-1] %} {{ edit_text }}   Download.    {% if worksheet.rating() != -1 %} This page is rated {{ "%.1f"|format(worksheet.rating()) }}. {% endif %} {% if not notebook.user_is_guest(username) and not worksheet.is_publisher(username) %}    {{ "Rerate" if worksheet.is_rater(username) else "Rate" }} it: {% for i in range(5) %}  {{ i }}  {% endfor %}    {% endif %} Other published documents...

{{ original_worksheet.name() }}

{{ worksheet.html_time_since_last_edited() }}

{{ worksheet_html }}
{% for i in range(10) %}   {% endfor %}