mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-18 22:58:53 +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-result-table-element {
|
||||||
.report-element-body {
|
.report-element-body {
|
||||||
padding-top: 30px;
|
padding-top: 30px;
|
||||||
|
|
@ -396,13 +396,15 @@ ul {
|
||||||
/** Step table element style */
|
/** Step table element style */
|
||||||
.report-step-table-element {
|
.report-step-table-element {
|
||||||
.report-element-header {
|
.report-element-header {
|
||||||
.user-time {
|
.table-name {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover > .report-element-header .user-time {
|
&:hover > .report-element-header {
|
||||||
color: $color-theme-primary;
|
.table-name {
|
||||||
|
color: $color-theme-primary;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,11 +90,11 @@ div.print-report {
|
||||||
}
|
}
|
||||||
|
|
||||||
.report-step-table-element {
|
.report-step-table-element {
|
||||||
& > .report-element-header .user-time {
|
& > .report-element-header .table-name {
|
||||||
color: $color-black;
|
color: $color-black;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover > .report-element-header .user-time {
|
&:hover > .report-element-header .table-name {
|
||||||
color: $color-black;
|
color: $color-black;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,16 @@
|
||||||
<% if table.blank? and @table.present? then table = @table end %>
|
<% if table.blank? and @table.present? then table = @table end %>
|
||||||
<% timestamp = table.created_at %>
|
<% 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="report-element-header">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="pull-left attachment-icon">
|
<div class="pull-left attachment-icon">
|
||||||
<span class="glyphicon glyphicon-th"></span>
|
<span class="glyphicon glyphicon-th"></span>
|
||||||
</div>
|
</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">
|
<div class="pull-left user-time">
|
||||||
<%=t 'projects.reports.elements.step_table.user_time', timestamp: l(timestamp, format: :full) %>
|
<%=t 'projects.reports.elements.step_table.user_time', timestamp: l(timestamp, format: :full) %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -380,6 +380,7 @@ en:
|
||||||
no_description: "No description"
|
no_description: "No description"
|
||||||
step_table:
|
step_table:
|
||||||
sidebar_name: "Table" # TODO
|
sidebar_name: "Table" # TODO
|
||||||
|
table_name: "[ %{name} ]"
|
||||||
user_time: "Table created on %{timestamp}."
|
user_time: "Table created on %{timestamp}."
|
||||||
step_asset:
|
step_asset:
|
||||||
sidebar_name: "File %{file}"
|
sidebar_name: "File %{file}"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue