Skip to content

Commit

Permalink
Disable (long blocking) download option for public (accounts=True) no…
Browse files Browse the repository at this point in the history
…tebook servers
  • Loading branch information
robertwb committed May 1, 2009
1 parent 80e32a6 commit 97eed3d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sage/server/notebook/templates/list_top.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
{% if pub is not defined or not pub %}
<a class="boldusercontrol" href="/new_worksheet" target="_blank">New Worksheet</a>
<a class="boldusercontrol" href="/upload">Upload</a>
{% if not accounts %}
<a class="boldusercontrol" href="/download_worksheets">Download All</a>
{% endif %}
{% endif %}

{% include 'search.html' %}

Expand Down
2 changes: 2 additions & 0 deletions src/sage/server/notebook/templates/worksheet_listing.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@
{% endif %}

<button onClick="stop_worksheets_button();" title="Stop selected worksheets">Stop</button>
{% if not accounts %}
<button onClick="download_worksheets_button();" title="Download selected worksheets">Download</button>
{% endif %}
<span style="padding-left:100px;">

Current Folder:
Expand Down
2 changes: 2 additions & 0 deletions src/sage/server/notebook/twist.py
Original file line number Diff line number Diff line change
Expand Up @@ -1479,6 +1479,8 @@ def render_worksheet_list(args, pub, username):
if pub and (not username or username == tuple([])):
username = 'pub'

accounts = notebook.get_accounts()

return template('worksheet_listing.html', **locals())


Expand Down

0 comments on commit 97eed3d

Please sign in to comment.