mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-11 14:27:04 +08:00
Add empty state for protocol actions toolbar [SCI-8077]
This commit is contained in:
parent
b9193748fa
commit
ece09ee9a5
4 changed files with 11 additions and 0 deletions
|
@ -695,6 +695,8 @@ var ProtocolsIndex = (function() {
|
||||||
actionToolbar.find('.btn').removeClass('btn-primary').addClass('btn-light');
|
actionToolbar.find('.btn').removeClass('btn-primary').addClass('btn-light');
|
||||||
actionToolbar.find('.btn:visible').first().addClass('btn-primary').removeClass('btn-light');
|
actionToolbar.find('.btn:visible').first().addClass('btn-primary').removeClass('btn-light');
|
||||||
actionToolbar.find('.btn').removeClass('notransition');
|
actionToolbar.find('.btn').removeClass('notransition');
|
||||||
|
|
||||||
|
actionToolbar.find('.emptyPlaceholder').toggleClass('hidden', actionToolbar.find('.btn:visible').length > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -56,6 +56,11 @@
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
.emptyPlaceholder {
|
||||||
|
color: $color-volcano;
|
||||||
|
margin-left: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
margin-right: .25em;
|
margin-right: .25em;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,4 +23,7 @@
|
||||||
<i class="fas fa-undo"></i>
|
<i class="fas fa-undo"></i>
|
||||||
<span class="button-text"><%= t("protocols.index.action_toolbar.restore") %></span>
|
<span class="button-text"><%= t("protocols.index.action_toolbar.restore") %></span>
|
||||||
</button>
|
</button>
|
||||||
|
<div class="emptyPlaceholder hidden">
|
||||||
|
<%= t("protocols.index.action_toolbar.empty_placeholder") %>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -2720,6 +2720,7 @@ en:
|
||||||
export: "Export"
|
export: "Export"
|
||||||
archive: "Archive"
|
archive: "Archive"
|
||||||
restore: "Restore"
|
restore: "Restore"
|
||||||
|
empty_placeholder: "There is no action available"
|
||||||
public_description: "Team protocols are visible and can be used by everyone from the team."
|
public_description: "Team protocols are visible and can be used by everyone from the team."
|
||||||
private_description: "My protocols are only visible to you."
|
private_description: "My protocols are only visible to you."
|
||||||
create_new: "New protocol"
|
create_new: "New protocol"
|
||||||
|
|
Loading…
Add table
Reference in a new issue