mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-12 16:14:58 +08:00
Archived protocol template navigation, icon, button [SCI-7954]
This commit is contained in:
parent
da31883ac3
commit
4a02a130f0
3 changed files with 5 additions and 2 deletions
|
@ -17,7 +17,7 @@
|
|||
<span class="fas fa-print" aria-hidden="true"></span>
|
||||
</a>
|
||||
<button class="btn btn-light" @click="openVersionsModal">{{ i18n.t("protocols.header.versions") }}</button>
|
||||
<button v-if="!protocol.attributes.published" @click="$emit('publish')" class="btn btn-primary">{{ i18n.t("protocols.header.publish") }}</button>
|
||||
<button v-if="protocol.attributes.urls.publish_url" @click="$emit('publish')" class="btn btn-primary">{{ i18n.t("protocols.header.publish") }}</button>
|
||||
<button v-if="protocol.attributes.urls.save_as_draft_url" @click="saveAsdraft" class="btn btn-secondary">{{ i18n.t("protocols.header.save_as_draft") }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -8,7 +8,7 @@ class ProtocolSerializer < ActiveModel::Serializer
|
|||
|
||||
attributes :name, :id, :urls, :description, :description_view, :updated_at, :in_repository,
|
||||
:created_at_formatted, :updated_at_formatted, :added_by, :authors, :keywords, :version, :code,
|
||||
:published, :version_comment
|
||||
:published, :version_comment, :archived
|
||||
|
||||
def updated_at
|
||||
object.updated_at.to_i
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
config: @inline_editable_title_config
|
||||
} %>
|
||||
<% else %>
|
||||
<% if @protocol.archived %>
|
||||
<i class="fas fa-archive"></i>
|
||||
<% end %>
|
||||
<div class="name-readonly-placeholder">
|
||||
<%= @protocol.name %>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue