mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-21 22:33:13 +08:00
Fix Share button in repositories
This commit is contained in:
parent
765a577669
commit
875515121b
3 changed files with 20 additions and 26 deletions
|
@ -86,7 +86,7 @@
|
|||
line-height: 12px;
|
||||
}
|
||||
|
||||
.datatables-buttons {
|
||||
.repo-datatables-buttons {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,11 +24,6 @@
|
|||
float: right;
|
||||
}
|
||||
|
||||
.new-repository-button {
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.custom-alert-info {
|
||||
background-color: $state-info-bg;
|
||||
border: 1px solid $state-info-border;
|
||||
|
|
|
@ -34,15 +34,13 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<div class="repo-datatables-buttons">
|
||||
<div class="new-repository-button">
|
||||
<% if can_share_repository?(@repository) && current_user.teams.count > 1 %>
|
||||
<%= link_to team_repository_share_modal_path(current_team, repository_id: @repository),
|
||||
class: 'btn btn-default share-repo-option', remote: true, id: 'shareRepoBtn' do %>
|
||||
<span class="fas fa-user-plus"></span>
|
||||
<span class="hidden-xs"><%= t('repositories.index.share_inventory') %></span>
|
||||
<% end %>
|
||||
<% if can_share_repository?(@repository) && current_user.teams.count > 1 %>
|
||||
<%= link_to team_repository_share_modal_path(current_team, repository_id: @repository),
|
||||
class: 'btn btn-secondary share-repo-option', remote: true, id: 'shareRepoBtn' do %>
|
||||
<span class="fas fa-user-plus"></span>
|
||||
<span class="hidden-xs"><%= t('repositories.index.share_inventory') %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<button class="btn btn-secondary help_tooltips manage-repo-column-index"
|
||||
data-modal-url="<%= repository_columns_index_html_path(@repository) %>"
|
||||
|
@ -51,9 +49,8 @@
|
|||
data-tooltipcontent="<%= I18n.t('tooltips.text.inventory.manage_columns') %>">
|
||||
<span class="fas fa-wrench"></span> <%= t('repositories.index.columns') %>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="repository-cog dropdown">
|
||||
<div class="repository-cog dropdown">
|
||||
<button id="repository-acitons-dropdown"
|
||||
class="btn btn-secondary"
|
||||
type="button"
|
||||
|
@ -69,18 +66,18 @@
|
|||
<% if can_perform_repository_actions(@repository) %>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<% if can_create_repository_rows?(@repository) %>
|
||||
<li>
|
||||
<a href="#" id="importRecordsButton" data-turbolinks="false">
|
||||
<%= t('repositories.index.options_dropdown.import_items') %>
|
||||
</a>
|
||||
<li>
|
||||
<li>
|
||||
<a href="#" id="importRecordsButton" data-turbolinks="false">
|
||||
<%= t('repositories.index.options_dropdown.import_items') %>
|
||||
</a>
|
||||
<li>
|
||||
<% end %>
|
||||
<% if can_read_repository?(@repository) %>
|
||||
<li>
|
||||
<a href="#" id="exportRepositoriesButton" data-turbolinks="false">
|
||||
<%= t("repositories.index.options_dropdown.export_items") %>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" id="exportRepositoriesButton" data-turbolinks="false">
|
||||
<%= t("repositories.index.options_dropdown.export_items") %>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if can_create_repositories?(current_team) && !@repository.shared_with?(current_team) %>
|
||||
<li>
|
||||
|
@ -101,7 +98,9 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="toolbar-delimiter"></div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue