scinote-web/app/views/protocols/_header.html.erb

61 lines
2.5 KiB
Plaintext
Raw Normal View History

2019-11-12 18:26:18 +08:00
<div class="page-header repository-protocol-name">
<%= render partial: "protocols/header/name_label.html.erb" %>
2016-07-21 19:11:15 +08:00
</div>
2019-11-12 18:26:18 +08:00
<div class="protocol-info">
<div class="created-at-block">
<span class="fas block-icon fa-calendar-alt"></span>
<span class="hidden-xs hidden-sm hidden-md"><%=t "protocols.header.created_at" %>:</span>
<b><%= l(@protocol.created_at, format: :full) %></b>
2016-07-21 19:11:15 +08:00
</div>
2019-11-12 18:26:18 +08:00
<div class="last-modified-block">
<span class="fas block-icon fa-calendar-alt"></span>
<span class="hidden-xs hidden-sm hidden-md"><%=t "protocols.header.updated_at" %>:</span>
<b data-role="updated-at-refresh"><%= render partial: "protocols/header/updated_at_label.html.erb" %></b>
2016-07-21 19:11:15 +08:00
</div>
2019-11-12 18:26:18 +08:00
<div class="added-by-block">
<span class="fas block-icon fa-user"></span>
<span class="hidden-xs hidden-sm hidden-md"><%=t "protocols.header.added_by" %>:</span>
<b><%= @protocol.added_by.full_name %></b>
</div>
<div class="edit-authors-block">
<span class="fas block-icon fa-graduation-cap"></span>
<span class="hidden-xs hidden-sm hidden-md"><%=t "protocols.header.authors" %>:</span>
<div class="edit-authors-container">
<%= render partial: "protocols/header/authors_label.html.erb", locals: {editable: true} %>
2016-07-21 19:11:15 +08:00
</div>
</div>
2019-11-12 18:26:18 +08:00
<div class="keywords-block">
<div class="badge-icon">
<% if can_manage_protocol_in_repository?(@protocol) %>
2016-07-21 19:11:15 +08:00
<a data-action="edit-keywords" data-remote="true" href="<%= edit_keywords_modal_protocol_path(@protocol, format: :json) %>" style="color: inherit;">
2019-11-12 18:26:18 +08:00
<span class="fas block-icon fa-font"></span>
2016-07-21 19:11:15 +08:00
</a>
<% else %>
2019-11-12 18:26:18 +08:00
<span class="fas block-icon fa-font"></span>
2016-07-21 19:11:15 +08:00
<% end %>
</div>
<div class="well well-sm">
<span class="hidden-xs hidden-sm hidden-md"><%=t "protocols.header.keywords" %>:</span>
<% if can_manage_protocol_in_repository?(@protocol) %>
2016-07-21 19:11:15 +08:00
<%= link_to edit_keywords_modal_protocol_path(@protocol, format: :json), remote: true, style: "color: inherit;", data: { action: "edit-keywords", role: "keywords-refresh" } do %>
<%= render partial: "protocols/header/keywords_label.html.erb" %>
<% end %>
<% else %>
<%= render partial: "protocols/header/keywords_label.html.erb" %>
<% end %>
</div>
</div>
2019-11-12 18:26:18 +08:00
<div class="protocol-description">
<%= render partial: "protocols/header/description_label.html.erb", locals: {edit_mode: true} %>
2016-07-21 19:11:15 +08:00
</div>
</div>
<%= javascript_include_tag "protocols/header" %>