This file is indexed.

/usr/lib/python2.7/dist-packages/sagenb/data/sage/html/worksheet_listing.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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
{% extends "html/base_authenticated.html" %}
{#
INPUT:
- pub -- a boolean stating whether to show in public mode.
- typ -- a string stating what kind of worksheets this listing shows
- worksheets -- list of Worksheet objects
- readonly -- a boolean stating whether the user is read only
#}
{% if pub %}
{% set worksheet_heading=gettext('Published Worksheets') %}
{% elif typ == 'trash' %}
{% set worksheet_heading=gettext('Deleted Worksheets') %}
{% elif typ == 'active' %}
{% set worksheet_heading=gettext('Active Worksheets') %}
{% else %}
{% set worksheet_heading=gettext('Archived Worksheets') %}
{% endif %}  

{% block title %}
{{ worksheet_heading }}
{% endblock %}

{% block page_id %}worksheet-listing-page{% endblock %}
{% block body_classes %}{% if pub %}public{% endif %}{% endblock %}

{% block javascript %}
{% if not pub %}
<link rel="stylesheet" href="/javascript/jqueryui/css/sage/jquery-ui.min.css" />
<script type="text/javascript" src="/javascript/jqueryui/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="/javascript/jquery/plugins/form/jquery.form.min.js"></script>
<script type="text/javascript">
    var worksheet_filenames = {{ worksheet_filenames|tojson| safe }}; 
</script>
<script type="text/javascript" src="/javascript/sage/js/notebook_lib.js"></script>
<script type="text/javascript" src="/javascript/dynamic/notebook_dynamic.js"></script>
{% else %}
<script type="text/javascript" src="/javascript/sage/js/ws_list.js"></script>
{% endif %}
{% endblock %}


{% block main %}
{% if readonly is defined and readonly %}
<h1>{{ gettext('Account is read only.  You may download or delete worksheets or data.') }}</h1>
{% endif %}
<div id="user-main-controls" class="user-controls">
    {% if pub is not defined or not pub %}
    <a href="/new_worksheet" target="_blank">{{ gettext('New Worksheet') }}</a>
    <a href="/upload">{{ gettext('Upload') }}</a>
    <a href="/download_worksheets.zip">{{ gettext('Download All Active') }}</a>
    {% endif %}

    <div id="search-area">
        <form action="." method="GET">
            <input type="hidden" value="{{ typ if not pub else 'pub' }}" name="typ" />
            <input id="search-worksheets" size="20" value="{{ search if search else "" }}" name="search" />
            <button class="add_new_worksheet_menu" id="search-worksheets-button" type="submit">{{ gettext('Search Worksheets') }}</button>
        </form>
    </div>
</div>       
<div id="worksheet-list-controls" class="controls">
    {% if not pub %}
    <div class="action-buttons">
        {% if typ == 'archive' %}
        <button onClick="make_active_button();" title="{{ gettext('Unarchive selected worksheets so it appears in the default worksheet list') }}">{{ gettext('Unarchive') }}</button>
        {% else %}
        <button onClick="archive_button();" title="{{ gettext('Archive selected worksheets so they do not appear in the default worksheet list') }}">{{ gettext('Archive') }}</button>
        {% endif %}

        {% if typ != 'trash' %}
        <button onClick="delete_button();" title="{{ gettext('Move the selected worksheets to the trash') }}">{{ gettext('Delete') }}</button>
        {% else %}
        <button onClick="make_active_button();" title="{{ gettext('Move the selected worksheets out of the trash') }}">{{ gettext('Undelete') }}</button>
        {% endif %}

        <button onClick="stop_worksheets_button();" title="{{ gettext('Stop selected worksheets') }}">{{ gettext('Stop') }}</button>
        <button onClick="download_worksheets_button();" title="{{ gettext('Download selected worksheets') }}">{{ gettext('Download') }}</button>
    </div>
    <div class="folders">
        {{ gettext('Current Folder') }}:
        <a class="{{ 'bold' if typ == 'active' else '' }}usercontrol" href=".">{{ gettext('Active') }}</a>
        <a class="{{ 'bold' if typ == 'archive' else '' }}usercontrol" href=".?typ=archive">{{ gettext('Archived') }}</a>
        <a class="{{ 'bold' if typ == 'trash' else '' }}usercontrol" href=".?typ=trash">{{ gettext('Trash') }}</a>

        {% if typ == 'trash' %}
        <form method="POST" action="/emptytrash" id="empty-trash-form">
            <a class="boldusercontrol" onClick="empty_trash(this); return false" href="#">({{ gettext('Empty Trash') }})</a>
        </form>
        {% endif %}
    </div>
    {% endif %}
</div>

<table cellspacing="0" cellpadding="0" id="worksheet-list">
    <thead>
        <tr>
            {% if not pub %}
            <td class="checkbox">
                <input id="controlbox" onClick="set_worksheet_list_checks();" class="entry" type="checkbox" />
            </td>
            {% else %}
            <td><a class="listcontrol" href=".?sort=rating">{{ gettext('Rating') }}</a></td>
            {% endif %}

            <td>
                <a class="listcontrol" href=".?typ={{ typ }}&sort=name{{ '' if sort != 'name' or reverse else '&reverse=True' }}">
                    {{ worksheet_heading }}
                </a>
            </td>
            
            <td>
                <a class="listcontrol" href=".?typ={{ typ }}&sort=owner{{ '' if sort != 'owner' or reverse else '&reverse=True' }}">
                    {{ gettext('Owner') }} {{ '' if pub else ' / '+gettext('Collaborators') }}
                </a>
            </td>

            <td>
                <a class="listcontrol" href=".?typ={{ typ }}{{ '' if sort != 'last_edited' or reverse else '&reverse=True' }}">
                    {{ gettext('Last Edited') }}
                </a>
            </td>
        </tr>
    </thead>
    <tbody>
        {% if not worksheets %}
        {% if pub %}
        <tr>
            <td colspan="5">
                {{ gettext('There are no published worksheets.') }}
            </td>
        </tr>
        {% elif typ == 'active' %}
        <tr>
            <td colspan="5" id="welcome-message">
                {{ gettext('Welcome to Sage! You can <a href="/new_worksheet">create a new worksheet</a>, view <a href="/pub/">published worksheets</a>, or read the <a href="/help" target="_new">documentation</a>.') }}
            </td>
        </tr>
        {% endif %}
        {% else %}

        {% for worksheet in worksheets %}
        {% set name = worksheet.filename() %}
        <tr>
            <td class="entry">
                {% if pub %}
                
                <a class="worksheet_edit" href="/home/{{ name }}/rating_info">
                    {% if worksheet.rating() < 0 %}
                    ----
                    {% else %}
                    {{ worksheet.rating() }}
                    {% endif %}
                </a>
                
                {% else %}
                
                <input type="checkbox" unchecked id="{{ name|css_escape }}" />
                {# I'm removing this select since it is a massive performance killer and these 
                serve no real purpose at all.  Plus google docs got rid of the analogous menu.
                <select onchange="go_option(this);" class="worksheet_edit">
                    <option value="" title="File options" selected>File</option>
                    <option value="list_rename_worksheet('{{ name }}','{{ worksheet.name() }}');" title="Change the name of this worksheet.">
                        Rename...
                    </option>            
                    <option value="list_edit_worksheet('{{ name }}');" title="Open this worksheet and edit it">Edit</option>
                    <option value="list_copy_worksheet('{{ name }}');" title="Copy this worksheet">Copy Worksheet</option>
                    <option value="list_share_worksheet('{{ name }}');" title="Share this worksheet with others">Collaborate</option>
                    <option value="list_publish_worksheet('{{ name }}');" title="Publish this worksheet on the internet">Publish</option>
                    <option value="list_revisions_of_worksheet('{{ name }}');" title="See all revisions of this worksheet">Revisions</option>
                </select>
                #}      
                {% endif %}
            </td>

            <td class="worksheet_link">
                <a title="{{ worksheet.name() }}" id="name-{{ name|css_escape }}" class="worksheetname" href="/home/{{ name }}/">
                    {% if worksheet.compute_process_has_been_started() %}({{ gettext('running') }}){% endif %}
                    {{ worksheet.truncated_name(50) }}
                </a>
                
                {% if not pub and worksheet.is_published() %}(Published){% endif %}
            </td>
            <td class="owner_collab">

                {% if not pub %}
                {{ worksheet.owner() }}
                {% else %}
                {{worksheet.worksheet_that_was_published().owner()}}
                {% endif %}
                
                {% if not pub and typ != 'trash' %}

                {% set shared = False %}

                {% if worksheet.collaborator_names() %}
                / {{ worksheet.collaborator_names(5) }}
                {% set shared = True %}
                {% endif %}

                {% if worksheet.viewer_names() %}
                / {{ worksheet.viewer_names(5) }}
                {% set shared = True %}
                {% endif %}

                {% if (worksheet.owner() != username) or username == 'admin' %}
                {% set shared = False %}
                {% endif %}
                
                {% if shared %}
                <a class="share" href="/home/{{ worksheet.filename() }}/share">{{ gettext('Add or Delete') }}</a>
                {% else %}
                <a class="share" href="/home/{{ worksheet.filename() }}/share">{{ gettext('Share now') }}</a>
                {% endif %}

                {% if worksheet.has_published_version() %}
                <a href="/home/{{ worksheet.published_version().filename() }}">
                    ({{ gettext('published') }})
                </a>
                {% endif %}
                
                {% endif %}
            </td>
            <td>
                {{ worksheet.html_time_nice_edited(username) | safe }}
            </td>
        </tr>
        {% endfor %}
        {% endif %}
    </tbody>
</table>
{% endblock %}