mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-13 16:45:18 +08:00
add names to tables from protocol steps in reports
This commit is contained in:
parent
b3c423c582
commit
3b92ab9f36
4 changed files with 15 additions and 7 deletions
|
@ -347,7 +347,7 @@ ul {
|
|||
}
|
||||
}
|
||||
|
||||
/* Result asset element style */
|
||||
/* Result table element style */
|
||||
.report-result-table-element {
|
||||
.report-element-body {
|
||||
padding-top: 30px;
|
||||
|
@ -396,13 +396,15 @@ ul {
|
|||
/** Step table element style */
|
||||
.report-step-table-element {
|
||||
.report-element-header {
|
||||
.user-time {
|
||||
.table-name {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover > .report-element-header .user-time {
|
||||
color: $color-theme-primary;
|
||||
&:hover > .report-element-header {
|
||||
.table-name {
|
||||
color: $color-theme-primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -90,11 +90,11 @@ div.print-report {
|
|||
}
|
||||
|
||||
.report-step-table-element {
|
||||
& > .report-element-header .user-time {
|
||||
& > .report-element-header .table-name {
|
||||
color: $color-black;
|
||||
}
|
||||
|
||||
&:hover > .report-element-header .user-time {
|
||||
&:hover > .report-element-header .table-name {
|
||||
color: $color-black;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
<% if table.blank? and @table.present? then table = @table end %>
|
||||
<% timestamp = table.created_at %>
|
||||
<div class="report-element report-step-attachment-element report-step-table-element" data-ts="<%= timestamp.to_i %>" data-type="step_table" data-id="<%= table.id %>" data-name="<%=t "projects.reports.elements.step_table.sidebar_name" %>" data-icon-class="glyphicon-th">
|
||||
<div class="report-element report-step-attachment-element report-step-table-element" data-ts="<%= timestamp.to_i %>" data-type="step_table" data-id="<%= table.id %>" data-name="<%= table.name %>" data-icon-class="glyphicon-th">
|
||||
<div class="report-element-header">
|
||||
<div class="row">
|
||||
<div class="pull-left attachment-icon">
|
||||
<span class="glyphicon glyphicon-th"></span>
|
||||
</div>
|
||||
<% unless table.name.empty? then %>
|
||||
<div class="pull-left table-name">
|
||||
<em><%=t 'projects.reports.elements.step_table.table_name', name: table.name %></em>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="pull-left user-time">
|
||||
<%=t 'projects.reports.elements.step_table.user_time', timestamp: l(timestamp, format: :full) %>
|
||||
</div>
|
||||
|
|
|
@ -380,6 +380,7 @@ en:
|
|||
no_description: "No description"
|
||||
step_table:
|
||||
sidebar_name: "Table" # TODO
|
||||
table_name: "[ %{name} ]"
|
||||
user_time: "Table created on %{timestamp}."
|
||||
step_asset:
|
||||
sidebar_name: "File %{file}"
|
||||
|
|
Loading…
Add table
Reference in a new issue