Merge pull request #2594 from urbanrotnik/4663-fix-button-visibility

Fix button visibility [SCI-4663]
This commit is contained in:
Urban Rotnik 2020-05-22 12:55:16 +02:00 committed by GitHub
commit 55f77cfe00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 11 deletions

View file

@ -40,13 +40,18 @@
</button>
</div>
<% end %>
<%= render partial: 'my_modules/repositories/full_view_version', collection: @repository_snapshots, as: :repository_snapshot %>
<%= render partial: 'my_modules/repositories/full_view_version',
collection: @repository_snapshots,
as: :repository_snapshot,
locals: { can_delete_snapshot: can_manage_module?(@my_module) } %>
</div>
</div>
<div class="list-group-item text-center">
<a id="setDefaultVersionButton" class="btn btn-primary default-version-button hidden" data-select-path="<%= my_module_select_default_snapshot_path(@my_module) %>">
<%= t('my_modules.repository.snapshots.full_view.set_default_button') %>
</a>
</div>
<% if can_manage_module?(@my_module) %>
<div class="list-group-item text-center">
<a id="setDefaultVersionButton" class="btn btn-primary default-version-button hidden" data-select-path="<%= my_module_select_default_snapshot_path(@my_module) %>">
<%= t('my_modules.repository.snapshots.full_view.set_default_button') %>
</a>
</div>
<% end %>
</div>

View file

@ -28,9 +28,11 @@
<% end %>
</div>
<div class="col-xs-4">
<a class="pull-right btn version-button delete-snapshot-button" href="#" data-action-path="<%= my_module_repository_snapshot_path(@my_module, repository_snapshot) %>">
<i class="fas fa-trash"></i>
</a>
<% if can_delete_snapshot %>
<a class="pull-right btn version-button delete-snapshot-button" href="#" data-action-path="<%= my_module_repository_snapshot_path(@my_module, repository_snapshot) %>">
<i class="fas fa-trash"></i>
</a>
<% end %>
</div>
</div>
</div>

View file

@ -41,7 +41,6 @@
class: 'form-control',
value: (params[:team] ? params[:team][:name] : '') %>
<% end %>
<span><small><%= t 'users.registrations.new.team_name_help' %></small></span>
</div>
<% end %>
<%= recaptcha_input_tag %>

View file

@ -11,7 +11,6 @@
<%= f.label :name, t('users.registrations.new.team_name_label') %>
<%= f.text_field :name, autofocus: true, class: 'form-control',
placeholder: t('users.registrations.new.team_name_placeholder') %>
<span><small><%= t 'users.registrations.new.team_name_help' %></small></span>
</div>
<% end %>