Fix empty page for inventory and fix task title [SCI-8556] (#5511)

* Remove empty state for inventory [SCI-8556]

* Fix shrinking of the task title on task page [SCI-8556]
This commit is contained in:
ajugo 2023-05-30 11:19:10 +02:00 committed by GitHub
parent d56eeeb26a
commit 14b3a1318b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 3 additions and 105 deletions

View file

@ -18,7 +18,8 @@
width: calc(100% + 3rem);
.my_module-name {
max-width: calc(100% - 38rem);
min-width: 5rem;
width: 100%;
}
}
}

View file

@ -425,66 +425,6 @@
}
}
.empty-sidebar-container {
padding: 1em 2.5em 2em 2em;
.repo-template {
border-radius: $border-radius-modal;
box-shadow: $modal-shadow;
font-weight: bold;
list-style-type: none;
padding-inline-start: 0;
li {
padding: 1em;
}
.fas-custom {
float: right;
}
}
.instructions {
@include font-main;
padding: .75em .25em;
}
}
.empty-repositories {
.content-header {
align-items: center;
border-bottom: $border-tertiary;
display: flex;
height: 4em;
margin-left: -2em;
padding-left: 2em;
width: calc(100% + 4em);
h1 {
margin: 0;
}
}
.content-body {
text-align: center;
.description {
@include font-main;
color: $color-silver-chalice;
margin: auto;
margin-bottom: 2em;
max-width: 570px;
}
}
.empty-inventory-img {
display: block;
margin: auto;
margin-top: 60px;
max-height: 290px;
}
}
.barcode-scanner {
cursor: pointer;
position: absolute;

View file

@ -30,7 +30,7 @@ class RepositoriesController < ApplicationController
def index
respond_to do |format|
format.html do
render 'empty_index' if @repositories.blank?
render 'index'
end
format.json do
render json: prepare_repositories_datatable(@repositories, current_team, params)

View file

@ -1,43 +0,0 @@
<% if @repositories.unscope(where: :archived).present? %>
<%= render template: "repositories/index.html.erb" %>
<% else %>
<% provide(:head_title, t('libraries.index.head_title')) %>
<% provide(:container_class, 'no-second-nav-container') %>
<% provide(:sidebar_url, sidebar_repositories_path) %>
<% provide(:sidebar_title, t('sidebar.repositories.sidebar_title')) %>
<%= content_for :sidebar do %>
<div class="empty-sidebar-container">
<ul class="repo-template">
<li><%= t('repositories.index.sidebar_repo1') %></li>
<li><%= t('repositories.index.sidebar_repo2') %><%= draw_custom_icon('i-shared') %></li>
<li><%= t('repositories.index.sidebar_repo3') %></li>
</ul>
<div class="instructions">
<%= t('repositories.index.sidebar_instructions') %>
</div>
</div>
<% end %>
<%= render "view_archived_btn" %>
<div class="content-pane flexible empty-repositories" data-readonly="<%= !can_manage_team?(current_team) %>">
<div class="content-body">
<%= image_tag('/images/empty_inventory_state.png', class: 'empty-inventory-img') %>
<h1>
<%= t('repositories.index.empty_title') %>
</h1>
<% if can_create_repositories?(current_team) %>
<div class="description"><%= t('repositories.index.empty_description_with_create') %></div>
<a id="createRepoBtn" class="btn btn-primary create-new-repository" data-remote="true" href="<%= create_modal_team_repositories_path(current_team) %>">
<span class="fas fa-plus"></span>
<span class="hidden-xs"><%= t('libraries.index.no_libraries.create_new_button') %></span>
</a>
<% else %>
<div class="description"><%= t('repositories.index.empty_description_no_create') %></div>
<% end %>
</div>
</div>
<%= javascript_include_tag 'repositories/index' %>
<% end %>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB