mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 17:51:13 +08:00
Add print label button in view repository role [SCI-7097] (#4351)
This commit is contained in:
parent
e4a7aa3dad
commit
8dec17f606
4 changed files with 21 additions and 10 deletions
|
@ -28,6 +28,11 @@
|
|||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.view-only-label {
|
||||
align-items: center;
|
||||
margin: auto 0;
|
||||
}
|
||||
}
|
||||
|
||||
.toolbar-right-block {
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
<span class="button-text"><%= t("repositories.hide_reminders") %></span>
|
||||
</button>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= render partial: 'repositories/toolbar/print_label_button' %>
|
||||
<% end %>
|
||||
<div class="archived-label" data-view-mode="archived">
|
||||
<%= render partial: 'repositories/toolbar/archive_label' %>
|
||||
|
|
10
app/views/repositories/toolbar/_print_label_button.html.erb
Normal file
10
app/views/repositories/toolbar/_print_label_button.html.erb
Normal file
|
@ -0,0 +1,10 @@
|
|||
<button type="button" id="toolbarPrintLabel"
|
||||
data-toggle="tooltip"
|
||||
data-placement="bottom"
|
||||
title="<%= t('repositories.show.button_tooltip.print_label') %>"
|
||||
class="btn btn-light print-label-button auto-shrink-button"
|
||||
data-dismiss="modal" data-url="<%= print_modal_repository_repository_rows_path(@repository) %>"
|
||||
data-rows="[]" style="display: none">
|
||||
<span class="fas fa-print"></span>
|
||||
<span class="button-text"><%= t('repository_row.modal_print_label.print_label') %></span>
|
||||
</button>
|
|
@ -32,16 +32,7 @@
|
|||
<span class="fas fa-download"></span>
|
||||
<span class="button-text"><%= t("repositories.index.options_dropdown.export_items") %></span>
|
||||
</button>
|
||||
<button type="button" id="toolbarPrintLabel"
|
||||
data-toggle="tooltip"
|
||||
data-placement="bottom"
|
||||
title="<%= t('repositories.show.button_tooltip.print_label') %>"
|
||||
class="btn btn-light print-label-button auto-shrink-button"
|
||||
data-dismiss="modal" data-url="<%= print_modal_repository_repository_rows_path(@repository) %>"
|
||||
data-rows="[]" style="display: none">
|
||||
<span class="fas fa-print"></span>
|
||||
<span class="button-text"><%= t('repository_row.modal_print_label.print_label') %></span>
|
||||
</button>
|
||||
<%= render partial: 'repositories/toolbar/print_label_button' %>
|
||||
<% if can_delete_repository_rows?(@repository) %>
|
||||
<button type="button"
|
||||
data-toggle="tooltip"
|
||||
|
@ -76,5 +67,8 @@
|
|||
</button>
|
||||
</span>
|
||||
<% elsif @repository.shared_with_read?(current_team) %>
|
||||
<%= render partial: 'repositories/toolbar/print_label_button' %>
|
||||
<p class="view-only-label"><%= t('repositories.index.view_only_permission_label') %></p>
|
||||
<% elsif can_read_repository?(@repository) %>
|
||||
<%= render partial: 'repositories/toolbar/print_label_button' %>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in a new issue