mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-06 20:56:42 +08:00
Fix big inventory names (#2046)
This commit is contained in:
parent
27104a495c
commit
40b5b2406b
3 changed files with 27 additions and 17 deletions
|
@ -5,6 +5,7 @@
|
||||||
.inline-editing-container {
|
.inline-editing-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
max-width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.button-container {
|
.button-container {
|
||||||
|
|
|
@ -97,13 +97,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.repository-title-container {
|
.repository-title-name {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
width: calc(100% + 40px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.repository-title-name {
|
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
|
@ -113,16 +109,30 @@
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
|
.name-container {
|
||||||
|
align-items: center;
|
||||||
|
display: inline-flex;
|
||||||
|
height: 32px;
|
||||||
|
|
||||||
|
.read-only-name {
|
||||||
|
display: inline-block;
|
||||||
|
line-height: 32px;
|
||||||
|
max-width: calc(100% - 30px);
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
.inline-editing-container {
|
.inline-editing-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.repository-subtitle {
|
.repository-subtitle {
|
||||||
color: $color-silver-chalice;
|
color: $color-silver-chalice;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 12px;
|
line-height: 12px;
|
||||||
padding-left: 5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.datatables-buttons {
|
.datatables-buttons {
|
||||||
|
|
|
@ -11,27 +11,26 @@
|
||||||
|
|
||||||
<div class="content-pane repository-show">
|
<div class="content-pane repository-show">
|
||||||
<div id="repository-toolbar">
|
<div id="repository-toolbar">
|
||||||
<div class="repository-title-container">
|
|
||||||
|
|
||||||
<div class="repository-title-name">
|
<div class="repository-title-name">
|
||||||
|
<span class="name-container">
|
||||||
<% if @inline_editable_title_config.present? %>
|
<% if @inline_editable_title_config.present? %>
|
||||||
<%= render partial: "shared/inline_editing",
|
<%= render partial: "shared/inline_editing",
|
||||||
locals: { initial_value: @repository.name } %>
|
locals: { initial_value: @repository.name } %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
<div class="read-only-name">
|
||||||
<%= @repository.name %>
|
<%= @repository.name %>
|
||||||
|
</div>
|
||||||
<span class="repository-share-icon">
|
<span class="repository-share-icon">
|
||||||
<%= inventory_shared_status_icon(@repository, current_team) %>
|
<%= inventory_shared_status_icon(@repository, current_team) %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</span>
|
||||||
|
|
||||||
<% if @repository.shared_with_anybody? %>
|
<% if @repository.shared_with_anybody? %>
|
||||||
<% team_name = @repository.team == current_team ? 'your Team' : @repository.team.name %>
|
<% team_name = @repository.team == current_team ? 'your Team' : @repository.team.name %>
|
||||||
<div class="repository-subtitle"><%= t('repositories.subtitle', team_name: team_name) %></div>
|
<div class="repository-subtitle"><%= t('repositories.subtitle', team_name: team_name) %></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="datatables-buttons" class="datatables-buttons">
|
||||||
<div id="datatables-buttons" class="datatables-buttons" style="display: inline;">
|
|
||||||
<div class="new-repository-button">
|
<div class="new-repository-button">
|
||||||
<% if can_share_repository?(@repository) && current_user.teams.count > 1 %>
|
<% if can_share_repository?(@repository) && current_user.teams.count > 1 %>
|
||||||
<%= link_to team_repository_share_modal_path(current_team, repository_id: @repository),
|
<%= link_to team_repository_share_modal_path(current_team, repository_id: @repository),
|
||||||
|
|
Loading…
Reference in a new issue