mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 01:44:34 +08:00
Merge pull request #430 from mlorb/ml_sci_826
Display smart annotations in reports [SCi-826]
This commit is contained in:
commit
2d073c8c04
9 changed files with 38 additions and 18 deletions
|
@ -854,6 +854,14 @@ a[data-toggle="tooltip"] {
|
|||
|
||||
.dataTables_paginate {
|
||||
float: right;
|
||||
|
||||
.pagination {
|
||||
margin: 2px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.dataTables_info {
|
||||
padding-top: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
class StepsController < ApplicationController
|
||||
include ActionView::Helpers::TextHelper
|
||||
include ApplicationHelper
|
||||
|
||||
before_action :load_vars, only: [:edit, :update, :destroy, :show]
|
||||
before_action :load_vars_nested, only: [:new, :create]
|
||||
before_action :load_paperclip_vars
|
||||
|
@ -286,7 +289,7 @@ class StepsController < ApplicationController
|
|||
message = t(
|
||||
str,
|
||||
user: current_user.full_name,
|
||||
checkbox: chkItem.text,
|
||||
checkbox: smart_annotation_parser(simple_format(chkItem.text)),
|
||||
step: chkItem.checklist.step.position + 1,
|
||||
step_name: chkItem.checklist.step.name,
|
||||
completed: completed_items,
|
||||
|
|
|
@ -27,9 +27,10 @@
|
|||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<% if experiment.description.present? %>
|
||||
<%= auto_link(simple_format(experiment.description),
|
||||
<%= auto_link(smart_annotation_parser(simple_format(experiment.description)),
|
||||
link: :urls,
|
||||
html: { target: '_blank' }) %>
|
||||
sanitize: false,
|
||||
html: { target: '_blank' }).html_safe %>
|
||||
<% else %>
|
||||
<em><%=t "projects.reports.elements.experiment.no_description" %></em>
|
||||
<% end %>
|
||||
|
|
|
@ -31,9 +31,10 @@
|
|||
</span>
|
||||
<span class="comment-message">
|
||||
|
||||
<%= auto_link(simple_format(comment.message),
|
||||
link: :urls,
|
||||
html: { target: '_blank' }) %>
|
||||
<%= auto_link(smart_annotation_parser(simple_format(comment.message)),
|
||||
link: :urls,
|
||||
sanitize: false,
|
||||
html: { target: '_blank' }).html_safe %>
|
||||
</span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
|
|
@ -23,8 +23,9 @@
|
|||
<div class="report-element-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-container ql-editor">
|
||||
<%= auto_link(result_text.text,
|
||||
<%= auto_link(smart_annotation_parser(result_text.text),
|
||||
link: :urls,
|
||||
sanitize: false,
|
||||
html: { target: '_blank' }).html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -8,7 +8,10 @@
|
|||
<span class="glyphicon glyphicon-list"></span>
|
||||
</div>
|
||||
<div class="pull-left checklist-name">
|
||||
<em><%=t 'projects.reports.elements.step_checklist.checklist_name', name: checklist.name %></em>
|
||||
<%= auto_link(smart_annotation_parser(simple_format(t 'projects.reports.elements.step_checklist.checklist_name', name: checklist.name)),
|
||||
link: :urls,
|
||||
sanitize: false,
|
||||
html: { target: '_blank' }).html_safe %>
|
||||
</div>
|
||||
<div class="pull-left user-time">
|
||||
<%=t 'projects.reports.elements.step_checklist.user_time', timestamp: l(timestamp, format: :full) %>
|
||||
|
@ -24,10 +27,10 @@
|
|||
<li>
|
||||
<input type="checkbox" disabled="disabled" <%= "checked='checked'" if item.checked %>/>
|
||||
<span class="<%= 'checked' if item.checked %>">
|
||||
<%= auto_link(simple_format(item.text),
|
||||
link: :urls,
|
||||
html: { target: '_blank' }) %></span>
|
||||
|
||||
<%= auto_link(smart_annotation_parser(simple_format(item.text)),
|
||||
link: :urls,
|
||||
sanitize: false,
|
||||
html: { target: '_blank' }).html_safe %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
|
@ -31,9 +31,10 @@
|
|||
</span>
|
||||
<span class="comment-message">
|
||||
|
||||
<%= auto_link(simple_format(comment.message),
|
||||
link: :urls,
|
||||
html: { target: '_blank' }) %>
|
||||
<%= auto_link(smart_annotation_parser(simple_format(comment.message)),
|
||||
link: :urls,
|
||||
sanitize: false,
|
||||
html: { target: '_blank' }).html_safe %>
|
||||
</span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
|
|
@ -27,9 +27,10 @@
|
|||
<div class="row">
|
||||
<div class="col-xs-12 ql-editor">
|
||||
<% if strip_tags(step.description).present? %>
|
||||
<%= auto_link(step.description,
|
||||
link: :urls,
|
||||
html: { target: '_blank' }).html_safe %>
|
||||
<%= auto_link(smart_annotation_parser(step.description),
|
||||
link: :urls,
|
||||
sanitize: false,
|
||||
html: { target: '_blank' }).html_safe %>
|
||||
<% else %>
|
||||
<em><%=t "projects.reports.elements.step.no_description" %></em>
|
||||
<% end %>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<div class="ql-editor">
|
||||
<%= auto_link(smart_annotation_parser(result.result_text.text),
|
||||
link: :urls,
|
||||
sanitize: false,
|
||||
html: { target: '_blank' }).html_safe %>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue