Skip to content

Commit

Permalink
Merge pull request #10775 from adlius/disable-files-widget
Browse files Browse the repository at this point in the history
[ENG-6322] Disable files widget when gravyvalet is enabled
  • Loading branch information
adlius authored Oct 14, 2024
2 parents 203cd9f + f3a7478 commit f72aa1a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 26 deletions.
1 change: 1 addition & 0 deletions website/project/views/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ def view_project(auth, node, **kwargs):
addons_widget_data['mendeley'] = mendeley_widget_data

ret.update({'addons_widget_data': addons_widget_data})
ret.update({'enable_gv': flag_is_active(request, features.ENABLE_GV)})
return ret


Expand Down
52 changes: 26 additions & 26 deletions website/templates/project/project.mako
Original file line number Diff line number Diff line change
Expand Up @@ -582,36 +582,36 @@
${ render_addon_widget.render_addon_widget('wiki', addons_widget_data['wiki']) }
%endif

<!-- Files -->
<div class="panel panel-default">
<div class="panel-heading clearfix">
<h3 class="panel-title">Files</h3>
<div class="pull-right">
<a href="${node['url']}files/" aria-label="Link to projects files" > <i class="fa fa-external-link"></i> </a>
</div>
</div>
% if not node['is_registration'] and not node['anonymous'] and permissions.WRITE in user['permissions']:
<div class="row">
<div class="col-sm-12 m-t-sm m-l-md">
<span class="f-w-xl">Click on a storage provider or drag and drop to upload</span>
%if not enable_gv:
<!-- Files -->
<div class="panel panel-default">
<div class="panel-heading clearfix">
<h3 class="panel-title">Files</h3>
<div class="pull-right">
<a href="${node['url']}files/" aria-label="Link to projects files" > <i class="fa fa-external-link"></i> </a>
</div>
</div>
<div class="panel-body panel-body-with-instructions">
%else:
<div class="panel-body">
%endif
<div id="treeGrid">
<div class="spinner-loading-wrapper">
<div class="ball-scale ball-scale-blue">
<div></div>
</div>
<p class="m-t-sm fg-load-message"> Loading files... </p>
% if not node['is_registration'] and not node['anonymous'] and permissions.WRITE in user['permissions']:
<div class="row">
<div class="col-sm-12 m-t-sm m-l-md">
<span class="f-w-xl">Click on a storage provider or drag and drop to upload</span>
</div>
</div>
</div><!-- end .panel-body -->


</div>
<div class="panel-body panel-body-with-instructions">
%else:
<div class="panel-body">
%endif
<div id="treeGrid">
<div class="spinner-loading-wrapper">
<div class="ball-scale ball-scale-blue">
<div></div>
</div>
<p class="m-t-sm fg-load-message"> Loading files... </p>
</div>
</div>
</div><!-- end .panel-body -->
</div>
%endif

% if addons:
<!-- Show widgets in left column if present -->
Expand Down

0 comments on commit f72aa1a

Please sign in to comment.