1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-22 11:57:34 +00:00

Merge pull request #358 from haiwen/fix-office-preview-in-shared-link

fixed preview office files in share links and priv shares
This commit is contained in:
xiez
2015-02-02 16:32:38 +08:00

View File

@@ -696,6 +696,8 @@ def view_shared_file(request, token):
save_to_link = reverse('save_shared_link') + '?t=' + token
traffic_over_limit = user_traffic_over_limit(shared_by)
office_preview_token = ret_dict.get('office_preview_token', '')
return render_to_response('shared_file_view.html', {
'repo': repo,
'obj_id': obj_id,
@@ -713,6 +715,7 @@ def view_shared_file(request, token):
'file_encoding_list':ret_dict['file_encoding_list'],
'html_exists': ret_dict['html_exists'],
'html_detail': ret_dict.get('html_detail', {}),
'office_preview_token': office_preview_token,
'filetype': ret_dict['filetype'],
'use_pdfjs':USE_PDFJS,
'accessible_repos': accessible_repos,
@@ -844,6 +847,7 @@ def view_file_via_shared_dir(request, token):
ret_dict['err'] = err_msg
traffic_over_limit = user_traffic_over_limit(shared_by)
office_preview_token = ret_dict.get('office_preview_token', '')
return render_to_response('shared_file_view.html', {
'repo': repo,
@@ -863,6 +867,7 @@ def view_file_via_shared_dir(request, token):
'file_encoding_list':ret_dict['file_encoding_list'],
'html_exists': ret_dict['html_exists'],
'html_detail': ret_dict.get('html_detail', {}),
'office_preview_token': office_preview_token,
'filetype': ret_dict['filetype'],
'use_pdfjs':USE_PDFJS,
'zipped': zipped,
@@ -1409,6 +1414,7 @@ def view_priv_shared_file(request, token):
accessible_repos = get_unencry_rw_repos_by_user(request)
save_to_link = reverse('save_private_file_share', args=[pfs.token])
office_preview_token = ret_dict.get('office_preview_token', '')
return render_to_response('shared_file_view.html', {
'repo': repo,
@@ -1426,6 +1432,7 @@ def view_priv_shared_file(request, token):
'file_encoding_list':ret_dict['file_encoding_list'],
'html_exists': ret_dict['html_exists'],
'html_detail': ret_dict.get('html_detail', {}),
'office_preview_token': office_preview_token,
'filetype': ret_dict['filetype'],
'use_pdfjs':USE_PDFJS,
'accessible_repos': accessible_repos,